Added the speaking module to the application

This commit is contained in:
Tiago Ribeiro
2023-04-17 17:35:26 +01:00
parent 207328dade
commit c321a5cc69
8 changed files with 186 additions and 20 deletions

View File

@@ -10,7 +10,6 @@ export default function useUser({redirectTo = "", redirectIfFound = false} = {})
const {data: user, mutate: mutateUser, isLoading} = useSWR<User>("/api/user", fetcher);
useEffect(() => {
console.log("HERE!!!");
// if no redirect needed, just return (example: already on /dashboard)
// if user data not yet there (fetch in progress, logged in or not) then don't do anything yet
if (!redirectTo || !user) return;