fix: use navigation urls
This commit is contained in:
@@ -14,13 +14,17 @@ export default function Sidebar({ menuItems }: SidebarProps) {
|
|||||||
{/* Base styles.active on menuItem href and current path */}
|
{/* Base styles.active on menuItem href and current path */}
|
||||||
{menuItems.map((item) => (
|
{menuItems.map((item) => (
|
||||||
<>
|
<>
|
||||||
<Link key={item.uid} className={styles.link} href="#">
|
<Link key={item.uid} className={styles.link} href={item.url}>
|
||||||
{item.linkText || item.title}
|
{item.linkText || item.title}
|
||||||
</Link>
|
</Link>
|
||||||
{item.subItems
|
{item.subItems
|
||||||
? item.subItems.map((subItem) => {
|
? item.subItems.map((subItem) => {
|
||||||
return (
|
return (
|
||||||
<Link key={subItem.uid} className={styles.link} href="#">
|
<Link
|
||||||
|
key={subItem.uid}
|
||||||
|
className={styles.link}
|
||||||
|
href={subItem.url}
|
||||||
|
>
|
||||||
{subItem.linkText || subItem.title}
|
{subItem.linkText || subItem.title}
|
||||||
</Link>
|
</Link>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ export type MenuItem = {
|
|||||||
title: string
|
title: string
|
||||||
linkText: string
|
linkText: string
|
||||||
subItems: MenuItem[] | null
|
subItems: MenuItem[] | null
|
||||||
url?: string
|
url: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SidebarProps = { menuItems: MenuItem[] }
|
export type SidebarProps = { menuItems: MenuItem[] }
|
||||||
@@ -14,7 +14,7 @@ export type SidebarProps = { menuItems: MenuItem[] }
|
|||||||
export type PageLink = {
|
export type PageLink = {
|
||||||
uid: string
|
uid: string
|
||||||
title: string
|
title: string
|
||||||
url?: string
|
url: string
|
||||||
system: { uid: string }
|
system: { uid: string }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user