mirror of
https://github.com/urosran/cally.git
synced 2025-07-17 02:25:10 +00:00
additional hooks
This commit is contained in:
20
hooks/firebase/useSignIn.ts
Normal file
20
hooks/firebase/useSignIn.ts
Normal file
@ -0,0 +1,20 @@
|
||||
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 useSignIn = () => {
|
||||
|
||||
return useMutation({
|
||||
mutationKey: ["signIn"],
|
||||
mutationFn: async ({
|
||||
email,
|
||||
password,
|
||||
}: {
|
||||
email: string;
|
||||
password: string;
|
||||
}) => {
|
||||
await auth().signInWithEmailAndPassword(email, password);
|
||||
},
|
||||
});
|
||||
};
|
Reference in New Issue
Block a user