From a49e0d8ff0cb4f9b37ccfd224a5f35a02ae07488 Mon Sep 17 00:00:00 2001 From: Adrian Bonpin Date: Sun, 26 Apr 2026 08:03:50 -0500 Subject: [PATCH] fix: align navbar profile button styling with other nav links --- components/navbar.tsx | 362 ++++++++++++++++++++++-------------------- 1 file changed, 188 insertions(+), 174 deletions(-) diff --git a/components/navbar.tsx b/components/navbar.tsx index 1611e58..255b960 100644 --- a/components/navbar.tsx +++ b/components/navbar.tsx @@ -18,6 +18,7 @@ export default function Navbar() { const searchParams = useSearchParams() const isLanding = pathname === "/" + const isAuthRoute = pathname.startsWith("/login") || pathname.startsWith("/signup") || pathname.startsWith("/forgot-password") || pathname.startsWith("/reset-password") const [searchQuery, setSearchQuery] = useState( () => searchParams.get("q") || "", @@ -117,193 +118,206 @@ export default function Navbar() { (route) => route.href !== "/" && route.href !== "/search", ) + // Hide navbar on auth routes + if (isAuthRoute) { + return null + } + return ( <> - - + - DeckyVault Logo - {!isLanding && ( - - DeckyVault - - )} - + + DeckyVault Logo + {!isLanding && ( + + DeckyVault + + )} + - - {!isLanding && ( - - + {!isLanding && ( + - setIsFocused(true)} - onBlur={() => setIsFocused(false)} - className='flex-1 outline-none bg-transparent text-sm min-w-0' - /> - - { - setSearchQuery("") - if (!isLanding) { - const params = new URLSearchParams( - searchParams.toString(), - ) - params.delete("q") - router.replace( - `/search?${params.toString()}`, - { - scroll: false, - }, - ) - } - }} - className={`h-3 w-3 transition-color cursor-default hover:stroke-accent transition-all ${ + > + - - - )} - - - {/* Desktop Navigation Links */} -
    - {navbarRoutes.map((route) => ( - - {route.title} - - ))} - - {isSessionLoading ? ( - - ) : session ? ( - - - {userMenuOpen && ( - <> -
    - setUserMenuOpen(false) + setIsFocused(true)} + onBlur={() => setIsFocused(false)} + className='flex-1 outline-none bg-transparent text-sm min-w-0' + /> + + { + setSearchQuery("") + if (!isLanding) { + const params = + new URLSearchParams( + searchParams.toString(), + ) + params.delete("q") + router.replace( + `/search?${params.toString()}`, + { + scroll: false, + }, + ) } - /> -
    - -
    - - )} - - ) : ( - - - login - - + }} + className={`h-3 w-3 transition-color cursor-default hover:stroke-accent transition-all ${ + isFocused || forceFocusStyles + ? "opacity-100" + : "opacity-0" + }`} + /> +
    + )} -
- {/* Mobile Hamburger Button */} - -
+ {/* Desktop Navigation Links */} + + + {/* Mobile Hamburger Button */} + +
+ {/* Mobile Sidebar Overlay */}