'use client'; import { usePathname, useRouter } from 'next/navigation'; import { LayoutDashboard, Dumbbell, ListChecks, Upload, Settings, LogOut, } from 'lucide-react'; import { logoutAction } from './actions'; interface NavigationProps { userName: string; } const navLinks = [ { href: '/main/dashboard', label: 'Dashboard', icon: LayoutDashboard }, { href: '/main/workouts', label: 'Workouts', icon: Dumbbell }, { href: '/main/exercises', label: 'Exercises', icon: ListChecks }, { href: '/main/import', label: 'Import', icon: Upload }, { href: '/main/settings', label: 'Settings', icon: Settings }, ]; export default function Navigation({ userName }: NavigationProps) { const pathname = usePathname(); const router = useRouter(); const isActive = (href: string) => { return pathname === href || pathname.startsWith(href + '/'); }; const handleLogout = async () => { await logoutAction(); router.push('/auth/login'); }; return ( <> {/* Desktop Sidebar */} {/* Mobile Bottom Nav */}
); }