diff --git a/resources/js/components/nav-main.tsx b/resources/js/components/nav-main.tsx index e0759b7..c194362 100644 --- a/resources/js/components/nav-main.tsx +++ b/resources/js/components/nav-main.tsx @@ -1,5 +1,6 @@ "use client" +import { usePage } from "@inertiajs/react" import { SidebarGroup, SidebarGroupLabel, @@ -24,10 +25,11 @@ export function NavMain({ }: { items: (NavGroup | NavItem)[] }) { + const { url } = usePage() return ( <> - {items.map((item, index) => { + {items.map((item) => { if ("label" in item) { return ( @@ -35,7 +37,7 @@ export function NavMain({ {item.items.map((child) => ( - + {child.name} @@ -52,7 +54,7 @@ export function NavMain({ - + {item.name}