'use client'; import { routes } from '@/lib/routing/RouteConfig'; import { Box } from '@/ui/Box'; import { Icon } from '@/ui/Icon'; import { Stack } from '@/ui/Stack'; import { Text } from '@/ui/Text'; import { Handshake, Palette, Settings, Trophy, User } from 'lucide-react'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { ProfileLayoutViewData } from '@/lib/view-data/ProfileLayoutViewData'; export function ProfileSidebarTemplate({ viewData: _viewData }: { viewData: ProfileLayoutViewData }) { const pathname = usePathname(); const navItems = [ { label: 'Overview', href: routes.protected.profile, icon: User }, { label: 'Leagues', href: routes.protected.profileLeagues, icon: Trophy }, { label: 'Liveries', href: routes.protected.profileLiveries, icon: Palette }, { label: 'Sponsorships', href: routes.protected.profileSponsorshipRequests, icon: Handshake }, { label: 'Settings', href: routes.protected.profileSettings, icon: Settings }, ]; return ( {navItems.map((item) => { const isActive = pathname === item.href; return ( {item.label} {isActive && ( )} ); })} ); }