diff --git a/frontend/src/hooks/auth/useSignUp.tsx b/frontend/src/hooks/auth/useSignUp.tsx index 032ca017c..39fc7cafc 100644 --- a/frontend/src/hooks/auth/useSignUp.tsx +++ b/frontend/src/hooks/auth/useSignUp.tsx @@ -21,11 +21,10 @@ const useSignUp = (emailName: EmailNameType, { onSuccess, onError }: UseSignUpCa return useQuery( ['checkUserExists', emailName.email], - () => { + () => NEXT_PUBLIC_ENABLE_AZURE ? checkUserExistsAD(emailName.email) - : checkUserExists(emailName.email); - }, + : checkUserExists(emailName.email), { enabled: !!emailName.email && !emailName.goback, refetchOnMount: false,