From 249bfdaf5a418f3a424a845af201b426712bb8b9 Mon Sep 17 00:00:00 2001 From: Aaron William Po Date: Mon, 13 Feb 2023 16:15:10 -0500 Subject: [PATCH] fix logout --- components/ui/Navbar.tsx | 6 +++--- hooks/useUser.ts | 3 +++ pages/api/users/logout.ts | 6 +----- pages/api/users/register.ts | 6 ++++++ pages/logout/index.tsx | 16 ---------------- pages/register/index.tsx | 4 +++- 6 files changed, 16 insertions(+), 25 deletions(-) delete mode 100644 pages/logout/index.tsx diff --git a/components/ui/Navbar.tsx b/components/ui/Navbar.tsx index 9b81836..a329b6b 100644 --- a/components/ui/Navbar.tsx +++ b/components/ui/Navbar.tsx @@ -23,7 +23,7 @@ const Navbar = () => { const authenticatedPages: readonly Page[] = [ { slug: '/account', name: 'Account' }, - { slug: '/logout', name: 'Logout' }, + { slug: '/api/users/logout', name: 'Logout' }, ]; const unauthenticatedPages: readonly Page[] = [ @@ -44,7 +44,7 @@ const Navbar = () => { return (