mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 18:52:06 +00:00
fix logout
This commit is contained in:
@@ -9,6 +9,9 @@ const useUser = () => {
|
||||
error,
|
||||
isLoading,
|
||||
} = useSWR('/api/users/current', async (url) => {
|
||||
if (!document.cookie.includes('token')) {
|
||||
return null;
|
||||
}
|
||||
const response = await fetch(url);
|
||||
|
||||
if (!response.ok) {
|
||||
|
||||
Reference in New Issue
Block a user