Fix the mobile nav dropdown
This commit is contained in:
parent
5e4b0949c2
commit
27075088ee
1 changed files with 4 additions and 15 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Reference in a new issue