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}) } }); }