From 27075088ee107aaae08a6c58d9045982e5c99063 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Thu, 10 Jul 2025 09:14:21 -0700 Subject: [PATCH] Fix the mobile nav dropdown --- src/lib/components/NavDropdown.svelte | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/src/lib/components/NavDropdown.svelte b/src/lib/components/NavDropdown.svelte index 5eca792..2fd3a74 100644 --- a/src/lib/components/NavDropdown.svelte +++ b/src/lib/components/NavDropdown.svelte @@ -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,11 +33,9 @@ ? 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] + : navItems.find((item) => + currentPath.startsWith(item.href === '/' ? '/work' : item.href) + ) || navItems[0] ) // Get background color based on variant