mirror of
https://github.com/urosran/cally.git
synced 2025-07-10 23:27:18 +00:00
12 lines
510 B
TypeScript
12 lines
510 B
TypeScript
import {useMutation} from "react-query";
|
|
import {UserProfile} from "@/hooks/firebase/types/profileTypes";
|
|
import functions from '@react-native-firebase/functions';
|
|
|
|
export const useCreateSubUser = () => {
|
|
return useMutation({
|
|
mutationKey: ["createSubUser"],
|
|
mutationFn: async ({email, password, ...userProfile}: { email: string, password: string } & UserProfile) => {
|
|
return await functions().httpsCallable("createSubUser")({email, password, ...userProfile})
|
|
}
|
|
});
|
|
} |