Skip to content

Commit 0cafcc3

Browse files
authored
resolves persistent nav links (vercel#235)
Signed-off-by: Guy Lepage <[email protected]>
1 parent ffcca46 commit 0cafcc3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

components/ui/Navbar/SignOutButton.tsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ import s from './Navbar.module.css';
88
export default function SignOutButton() {
99
const router = useRouter();
1010
const { supabase } = useSupabase();
11+
const handleSignOut = async () => {
12+
await supabase.auth.signOut()
13+
router.refresh()
14+
}
1115
return (
1216
<button
1317
className={s.link}
14-
onClick={async () => {
15-
await supabase.auth.signOut();
16-
router.push('/signin');
17-
}}
18+
onClick={handleSignOut}
1819
>
1920
Sign out
2021
</button>

0 commit comments

Comments
 (0)