NOtification update

This commit is contained in:
Milan Paunovic
2024-10-12 09:15:30 +02:00
parent 3d4795c25d
commit 6e1e665b93
10 changed files with 107 additions and 17 deletions

View File

@ -4,7 +4,7 @@ import firestore from "@react-native-firebase/firestore";
import { EventData } from "@/hooks/firebase/types/eventData";
export const useCreateEvent = () => {
const {user: currentUser} = useAuthContext()
const {user: currentUser, profileData} = useAuthContext()
const queryClients = useQueryClient()
return useMutation({
@ -14,7 +14,7 @@ export const useCreateEvent = () => {
console.log("CALLLLL")
await firestore()
.collection("Events")
.add({...eventData, creatorId: currentUser?.uid})
.add({...eventData, creatorId: currentUser?.uid, familyId: profileData?.familyId})
} catch (e) {
console.error(e)
}