From 64bd0de7e8a4c43bfdf62e223c7cb480b4bca3b1 Mon Sep 17 00:00:00 2001 From: Maurice Date: Sun, 31 May 2026 20:10:24 +0200 Subject: [PATCH] Fix duplicate React keys in the file-assign place list When a place is assigned to the same day more than once it appeared twice in a day's list, so the place-button key={p.id} collided and React warned about duplicate keys. Key by place id + render index so siblings stay unique. Pre-existing in the old FileManager; behaviour unchanged. --- client/src/components/Files/FileManagerAssignModal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/Files/FileManagerAssignModal.tsx b/client/src/components/Files/FileManagerAssignModal.tsx index 017092d0..15ac32a5 100644 --- a/client/src/components/Files/FileManagerAssignModal.tsx +++ b/client/src/components/Files/FileManagerAssignModal.tsx @@ -64,10 +64,10 @@ export function AssignModal(S: FileManagerState) { } } const unassigned = places.filter(p => !assignedPlaceIds.has(p.id)) - const placeBtn = (p: Place) => { + const placeBtn = (p: Place, idx: number) => { const isLinked = file.place_id === p.id || (file.linked_place_ids || []).includes(p.id) return ( -