From 9e73410b177c592c7489cef67cc72bf39176c771 Mon Sep 17 00:00:00 2001 From: marcchehab <105868642+marcchehab@users.noreply.github.com> Date: Thu, 4 Jan 2024 14:14:49 +0100 Subject: [PATCH] Fix React warning about unique "key" prop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I always get a react warning: Warning: Each child in a list should have a unique "key" prop. This fixed it and makes for warning-free development 😊 --- packages/core/src/ui/SiteToc/SiteToc.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/core/src/ui/SiteToc/SiteToc.tsx b/packages/core/src/ui/SiteToc/SiteToc.tsx index 8d4ff9d79..792c2e8ee 100644 --- a/packages/core/src/ui/SiteToc/SiteToc.tsx +++ b/packages/core/src/ui/SiteToc/SiteToc.tsx @@ -46,8 +46,8 @@ export const SiteToc: React.FC = ({ currentPath, nav }) => { return ( ); @@ -96,8 +96,8 @@ const NavComponent: React.FC<{ leaveTo="transform scale-95 opacity-0" > - {sortNavGroupChildren(item.children).map((subItem) => ( - + {sortNavGroupChildren(item.children).map((subItem, index) => ( + ))}