fix(template): make every key in map unique using index

FIXES #2382
This commit is contained in:
Leonhard Breuer
2025-08-15 19:52:55 +02:00
parent 9763dce045
commit 4e7378371d

View File

@@ -307,9 +307,9 @@ export const AddTemplate = ({ projectId, baseUrl }: Props) => {
: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 xl:grid-cols-5 2xl:grid-cols-6",
)}
>
{templates?.map((template) => (
{templates?.map((template, idx) => (
<div
key={template?.id}
key={`${template.id}-${template.version || 'default'}-${idx}`}
className={cn(
"flex flex-col border rounded-lg overflow-hidden relative",
viewMode === "icon" && "h-[200px]",