File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11'use client' ;
22
3+ import { Fragment } from 'react' ;
34import Link from 'next/link' ;
45import { usePathname } from 'next/navigation' ;
56import {
@@ -32,16 +33,16 @@ export default function SidebarNav({ activeTab, links }: SidebarNavProps) {
3233 return items . map ( ( link ) => {
3334 if ( link . children ) {
3435 return (
35- < >
36+ < Fragment key = { link . id } >
3637 < MenuLabel > { link . label } </ MenuLabel >
3738 { renderMenuLinks ( link . children ) }
38- </ >
39+ </ Fragment >
3940 ) ;
4041 }
4142
4243 return (
4344 < MenuItem
44- key = { link . id }
45+ key = { link . id ?? link . href }
4546 leftSection = { link . icon }
4647 component = { Link }
4748 href = { link . href }
@@ -58,7 +59,7 @@ export default function SidebarNav({ activeTab, links }: SidebarNavProps) {
5859 return items . map ( ( item ) => {
5960 return (
6061 < NavLink
61- key = { item . id }
62+ key = { item . id ?? item . href }
6263 href = { item . href }
6364 label = { item . label }
6465 component = { Link }
@@ -83,7 +84,7 @@ export default function SidebarNav({ activeTab, links }: SidebarNavProps) {
8384 </ Menu >
8485 </ Box >
8586 < Box visibleFrom = "md" w = { { base : '100%' , md : '20%' } } >
86- < Stack h = "100%" gap = { 0 } >
87+ < Stack h = "100%" gap = { 0 } align = "flex-start" >
8788 { renderNavItems ( links ) }
8889 </ Stack >
8990 </ Box >
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export async function generateMetadata(
4343export default async function MDXLayout ( { children } : { children : React . ReactNode } ) {
4444 return (
4545 < Screen title = "Documentation" className = "markdown-page" >
46- < Group w = "100%" h = "100%" gap = { 0 } >
46+ < Group w = "100%" h = "100%" gap = { 0 } align = "flex-start" >
4747 < SidebarNav links = { DOCS_NAV_ITEMS } />
4848 < Stack h = "100%" w = "80%" className = "markdown" gap = { 0 } >
4949 { children }
You can’t perform that action at this time.
0 commit comments