Checkpoint: Remplacement du fragment vide <>...</> sans key par <Fragment key={u.id}>...</Fragment> dans le .map() de UsersPanel. Zéro erreur TypeScript, zéro erreur Vite.
This commit is contained in:
@@ -17,7 +17,7 @@ import {
|
|||||||
Users,
|
Users,
|
||||||
X,
|
X,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { useState, useMemo } from "react";
|
import { useState, useMemo, Fragment } from "react";
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
|
|
||||||
// ─── Types ────────────────────────────────────────────────────────────────────
|
// ─── Types ────────────────────────────────────────────────────────────────────
|
||||||
@@ -307,8 +307,8 @@ function UsersPanel() {
|
|||||||
const isExpanded = expandedAffectations === u.id;
|
const isExpanded = expandedAffectations === u.id;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<Fragment key={u.id}>
|
||||||
<tr key={u.id} className="hover:bg-muted/20 transition-colors">
|
<tr className="hover:bg-muted/20 transition-colors">
|
||||||
<td className="px-5 py-3.5">
|
<td className="px-5 py-3.5">
|
||||||
{isEditing ? (
|
{isEditing ? (
|
||||||
<input
|
<input
|
||||||
@@ -447,7 +447,7 @@ function UsersPanel() {
|
|||||||
isLoading={etablissementsQuery.isLoading}
|
isLoading={etablissementsQuery.isLoading}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</>
|
</Fragment>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
Reference in New Issue
Block a user