diff --git a/app-router/nextjs-dashboard/app/dashboard/layout.tsx b/app-router/nextjs-dashboard/app/dashboard/layout.tsx index 9f51ff9..86177d0 100644 --- a/app-router/nextjs-dashboard/app/dashboard/layout.tsx +++ b/app-router/nextjs-dashboard/app/dashboard/layout.tsx @@ -8,5 +8,5 @@ export default function Layout({children}: {children: React.ReactNode}){
{children}
- ); + ); }; \ No newline at end of file diff --git a/app-router/nextjs-dashboard/app/ui/dashboard/nav-links.tsx b/app-router/nextjs-dashboard/app/ui/dashboard/nav-links.tsx index 72fa462..37f1b0c 100644 --- a/app-router/nextjs-dashboard/app/ui/dashboard/nav-links.tsx +++ b/app-router/nextjs-dashboard/app/ui/dashboard/nav-links.tsx @@ -1,8 +1,13 @@ +'use client'; + import { UserGroupIcon, HomeIcon, DocumentDuplicateIcon, } from '@heroicons/react/24/outline'; +import Link from 'next/link'; +import { usePathname } from 'next/navigation'; +import clsx from 'clsx'; // Map of links to display in the side navigation. // Depending on the size of the application, this would be stored in a database. @@ -17,21 +22,28 @@ const links = [ ]; export default function NavLinks() { + const pathname = usePathname(); + return ( <> {links.map((link) => { const LinkIcon = link.icon; return ( -

{link.name}

-
+ ); })} ); -} +} \ No newline at end of file