From 5561f209e9591d20d9f6f52ac72a94f54f131474 Mon Sep 17 00:00:00 2001 From: Aaron William Po Date: Mon, 13 Feb 2023 19:27:36 -0500 Subject: [PATCH] Update useUser.ts Fixed issue where the current user was not being added to UserContext --- hooks/useUser.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/hooks/useUser.ts b/hooks/useUser.ts index ba75720..4c6b825 100644 --- a/hooks/useUser.ts +++ b/hooks/useUser.ts @@ -9,9 +9,6 @@ const useUser = () => { error, isLoading, } = useSWR('/api/users/current', async (url) => { - if (!document.cookie.includes('token')) { - return undefined; - } const response = await fetch(url); if (!response.ok) {