mirror of
https://github.com/urosran/cally.git
synced 2025-07-16 10:06:15 +00:00
Fix
This commit is contained in:
@ -4,13 +4,13 @@ import {useUpdateUserData} from "@/hooks/firebase/useUpdateUserData";
|
||||
import {ProfileType} from "@/contexts/AuthContext";
|
||||
|
||||
export const useSignUp = () => {
|
||||
const { mutateAsync: updateUserData } = useUpdateUserData()
|
||||
const {mutateAsync: updateUserData} = useUpdateUserData()
|
||||
|
||||
return useMutation({
|
||||
mutationKey: ["signUp"],
|
||||
mutationFn: async ({email, password}: { email: string, password: string }) => {
|
||||
const res= await auth().createUserWithEmailAndPassword(email, password);
|
||||
await updateUserData({userType: ProfileType.PARENT, email, password, customUser: res.user});
|
||||
const res = await auth().createUserWithEmailAndPassword(email, password);
|
||||
await updateUserData({newUserData: {userType: ProfileType.PARENT}, customUser: res.user});
|
||||
}
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user