mirror of
https://github.com/urosran/cally.git
synced 2025-07-16 01:56:16 +00:00
Fix profile type
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import {useMutation} from "react-query";
|
||||
import auth from "@react-native-firebase/auth";
|
||||
import {useUpdateUserData} from "@/hooks/firebase/useUpdateUserData";
|
||||
import {ProfileType} from "@/contexts/AuthContext";
|
||||
|
||||
export const useSignUp = () => {
|
||||
const { mutateAsync: updateUserData } = useUpdateUserData()
|
||||
@ -9,7 +10,7 @@ export const useSignUp = () => {
|
||||
mutationKey: ["signUp"],
|
||||
mutationFn: async ({email, password}: { email: string, password: string }) => {
|
||||
await auth().createUserWithEmailAndPassword(email, password)
|
||||
await updateUserData({userType: "parent", email, password})
|
||||
await updateUserData({userType: ProfileType.PARENT, email, password})
|
||||
}
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user