This commit is contained in:
Milan Paunovic
2024-08-23 18:04:30 +02:00
parent 0a862e7a8c
commit 5863ed7f4d
2 changed files with 7 additions and 4 deletions

View File

@ -9,8 +9,8 @@ export const useSignUp = () => {
return useMutation({
mutationKey: ["signUp"],
mutationFn: async ({email, password}: { email: string, password: string }) => {
await auth().createUserWithEmailAndPassword(email, password);
await updateUserData({userType: ProfileType.PARENT, email, password});
const res= await auth().createUserWithEmailAndPassword(email, password);
await updateUserData({userType: ProfileType.PARENT, email, password, customUser: res.user});
}
});
}