mirror of
https://github.com/urosran/cally.git
synced 2025-07-10 07:07:16 +00:00
14 lines
388 B
TypeScript
14 lines
388 B
TypeScript
import {useMutation} from "@tanstack/react-query";
|
|
import auth from "@react-native-firebase/auth";
|
|
import {useRouter} from "expo-router";
|
|
|
|
export const useSignOut = () => {
|
|
const {replace} = useRouter();
|
|
return useMutation({
|
|
mutationKey: ["signOut"],
|
|
mutationFn: async () => {
|
|
await auth().signOut()
|
|
replace("/(unauth)")
|
|
}
|
|
});
|
|
} |