mirror of
https://github.com/urosran/cally.git
synced 2025-11-26 00:24:53 +00:00
delete family popups and birthday
This commit is contained in:
@ -16,11 +16,13 @@ export const useSignUp = () => {
|
||||
password,
|
||||
firstName,
|
||||
lastName,
|
||||
birthday
|
||||
}: {
|
||||
email: string;
|
||||
password: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
birthday: Date;
|
||||
}) => {
|
||||
setRedirectOverride(true)
|
||||
|
||||
@ -35,6 +37,7 @@ export const useSignUp = () => {
|
||||
lastName: lastName,
|
||||
familyId: uuidv4(),
|
||||
timeZone: Localization.getCalendars()[0].timeZone,
|
||||
birthday: birthday
|
||||
},
|
||||
customUser: res.user,
|
||||
});
|
||||
|
||||
@ -13,7 +13,6 @@ export const useUpdateHouseholdName = () => {
|
||||
familyId: string;
|
||||
name: string;
|
||||
}) => {
|
||||
console.log("Mutation function called with data:", { familyId, name });
|
||||
|
||||
try {
|
||||
// Reference to the Households collection
|
||||
@ -25,11 +24,9 @@ export const useUpdateHouseholdName = () => {
|
||||
if (!snapshot.empty) {
|
||||
// If a household with the familyId exists, update the name
|
||||
const docId = snapshot.docs[0].id;
|
||||
console.log(`Household found with ID ${docId}, updating name...`);
|
||||
|
||||
await householdRef.doc(docId).update({ name });
|
||||
|
||||
console.log("Household name updated successfully.");
|
||||
} else {
|
||||
// If no household exists, create a new one with familyId and name
|
||||
console.log("No household found, creating a new one...");
|
||||
|
||||
Reference in New Issue
Block a user