diff --git a/app/MobileNav.js b/app/MobileNav.js index 01ae616..ba62a44 100644 --- a/app/MobileNav.js +++ b/app/MobileNav.js @@ -12,7 +12,9 @@ export default function MobileNav() { try { await logout() router.push('/signin') - } catch (error) {} + } catch (error) { + console.error('error logging out', error) + } } return ( @@ -23,12 +25,12 @@ export default function MobileNav() { Home - + Archive - + Profile @@ -39,12 +41,16 @@ export default function MobileNav() { <> {/* Sign Out Button */} - +
+
+ +
+
) : ( <> diff --git a/app/archive/page.js b/app/archive/page.js index ac0bdea..1c71c76 100644 --- a/app/archive/page.js +++ b/app/archive/page.js @@ -124,7 +124,7 @@ function Archive() { ) : ( - 'fetching archive URLs...' + 'No archive URLs' )} ) diff --git a/app/email-verification/page.js b/app/email-verification/page.js index caa5a6b..6a34386 100644 --- a/app/email-verification/page.js +++ b/app/email-verification/page.js @@ -64,8 +64,8 @@ export default function Verification() { setOtp(e.target.value)} required diff --git a/app/navbar.js b/app/navbar.js index 19eba59..84f42e0 100644 --- a/app/navbar.js +++ b/app/navbar.js @@ -6,11 +6,13 @@ import Link from 'next/link' import MobileNav from './MobileNav' import { AuthContext } from './AuthContext' import { usePathname } from 'next/navigation' +import { useRouter } from 'next/navigation' export default function Navbar() { const [isOpen, setIsOpen] = useState(false) const [isAuthenticated, setIsAuthenticated] = useState(false) const { token, logout } = useContext(AuthContext) + const router = useRouter() const pathname = usePathname() @@ -25,6 +27,7 @@ export default function Navbar() { console.error('Logout failed:', error) } } + return (