This commit is contained in:
daniel31x13
2024-08-14 16:44:07 -04:00
parent 9cc3a7206e
commit 8031432995
19 changed files with 39 additions and 25 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ import { useQuery, useMutation, useQueryClient } from "@tanstack/react-query";
import { useSession } from "next-auth/react";
const useUser = () => {
const { data } = useSession();
const { data, status } = useSession();
const userId = data?.user.id;
@@ -16,7 +16,7 @@ const useUser = () => {
return data.response;
},
enabled: !!userId,
enabled: !!userId && status === "authenticated",
placeholderData: {},
});
};