From e6b114a961c73448ad83655359a8ae3dcf0db7b6 Mon Sep 17 00:00:00 2001
From: Mednoob
Date: Thu, 7 Mar 2024 14:26:12 +0900
Subject: [PATCH] fix: fix errors regarding key props
---
src/components/Dropdown.tsx | 4 ++--
src/pages/test.tsx | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/components/Dropdown.tsx b/src/components/Dropdown.tsx
index 5e22df7..6f6ebbf 100644
--- a/src/components/Dropdown.tsx
+++ b/src/components/Dropdown.tsx
@@ -12,8 +12,8 @@ export default function Dropdown({ head, items }: { head: ReactNode; items: Reac
{open && (
- {items.map(x => (
-
{x}
+ {items.map((x, i) => (
+
{x}
))}
)}
diff --git a/src/pages/test.tsx b/src/pages/test.tsx
index 4805c97..a327e3c 100644
--- a/src/pages/test.tsx
+++ b/src/pages/test.tsx
@@ -3,13 +3,13 @@ import Dropdown from "../components/Dropdown";
function SampleDropdown() {
return (
Table A
,
- Table B
+ Table A,
+ Table B
]} />,
- Table User,
- Table Player
+ Table User,
+ Table Player
]} />
]} />
)