Files
cally/hooks/firebase/useSignIn.ts
Milan Paunovic 70db8bdc0b New calendar
2024-12-15 16:29:34 +01:00

19 lines
388 B
TypeScript

import { useMutation } from "@tanstack/react-query";
import auth from "@react-native-firebase/auth";
export const useSignIn = () => {
return useMutation({
mutationKey: ["signIn"],
mutationFn: async ({
email,
password,
}: {
email: string;
password: string;
}) => {
await auth().signInWithEmailAndPassword(email, password);
},
});
};