diff --git a/src/app/[orgId]/sites/[siteId]/layout.tsx b/src/app/[orgId]/sites/[siteId]/layout.tsx index dae1a54a3822d6738193991e70cf58f7e3cc3749..e161b9a5934739b5a636763a0e64772bc46bac32 100644 --- a/src/app/[orgId]/sites/[siteId]/layout.tsx +++ b/src/app/[orgId]/sites/[siteId]/layout.tsx @@ -84,7 +84,7 @@ export default async function SettingsLayout({ children, params }: SettingsLayou
diff --git a/src/components/sidebar-nav.tsx b/src/components/sidebar-nav.tsx index abfbbe0735e86c3e3763bc45d027dd0fccbeaf7d..bd8d46613dbe5a3a8c5dbd8f7a208c83c01c9d81 100644 --- a/src/components/sidebar-nav.tsx +++ b/src/components/sidebar-nav.tsx @@ -1,49 +1,53 @@ "use client" import React from 'react' import Link from "next/link" -import { usePathname } from "next/navigation" +import { useParams, usePathname, useRouter } from "next/navigation" import { cn } from "@/lib/utils" import { buttonVariants } from "@/components/ui/button" interface SidebarNavProps extends React.HTMLAttributes { - items: { - href: string - title: string - }[] - disabled?: boolean + items: { + href: string + title: string + }[] + disabled?: boolean } export function SidebarNav({ className, items, disabled = false, ...props }: SidebarNavProps) { - const pathname = usePathname() + const pathname = usePathname(); + const params = useParams(); + const orgId = params.orgId as string; + const siteId = params.siteId as string; + const resourceId = params.resourceId as string; - return ( - + ) } \ No newline at end of file