Skip to content

Commit f0fd85f

Browse files
authored
Update layout.tsx (#86)
Currently the key is duplicated since this key is also used in the breadcrumbs. added an index to the key to make it unique so that it will not collide and through a render error for duplicate keys.
1 parent 68aa552 commit f0fd85f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

resources/js/layouts/settings/layout.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ export default function SettingsLayout({ children }: PropsWithChildren) {
3939
<div className="flex flex-col space-y-8 lg:flex-row lg:space-y-0 lg:space-x-12">
4040
<aside className="w-full max-w-xl lg:w-48">
4141
<nav className="flex flex-col space-y-1 space-x-0">
42-
{sidebarNavItems.map((item) => (
42+
{sidebarNavItems.map((item, index) => (
4343
<Button
44-
key={item.href}
44+
key={`${item.href}-${index}`}
4545
size="sm"
4646
variant="ghost"
4747
asChild

0 commit comments

Comments
 (0)