Fix the mobile nav dropdown

This commit is contained in:
Justin Edmund 2025-07-10 09:14:21 -07:00
parent 5e4b0949c2
commit 27075088ee

View file

@ -22,16 +22,7 @@
const navItems: NavItem[] = [
{ icon: WorkIcon, text: 'Work', href: '/', variant: 'work' },
{ icon: UniverseIcon, text: 'Universe', href: '/universe', variant: 'universe' },
{
icon: PhotosIcon,
text: 'Photography',
href: '/photos',
variant: 'photos',
subItems: [
{ text: 'Photos', href: '/photos' },
{ text: 'Albums', href: '/albums' }
]
},
{ icon: PhotosIcon, text: 'Photos', href: '/photos', variant: 'photos' },
{ icon: LabsIcon, text: 'Labs', href: '/labs', variant: 'labs' },
{ icon: AboutIcon, text: 'About', href: '/about', variant: 'about' }
]
@ -42,8 +33,6 @@
? navItems[0]
: currentPath === '/about'
? navItems[4]
: currentPath.startsWith('/albums') || currentPath.startsWith('/photos')
? navItems.find((item) => item.variant === 'photos')
: navItems.find((item) =>
currentPath.startsWith(item.href === '/' ? '/work' : item.href)
) || navItems[0]