Skip to content

Commit

Permalink
add participants to child when goal shared to new contacts when shari…
Browse files Browse the repository at this point in the history
…ng req accepted
  • Loading branch information
vinaybadgujar102 committed Nov 7, 2024
1 parent b2cbdc8 commit 30ba34c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/hooks/useApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,14 @@ function useApp() {
rootGoalId: goalId,
})),
]).then(async () => {
updateSharedStatusOfGoal(goalId, relId, name).then(() => console.log("status updated"));
await Promise.all(
goalWithChildrens.map(async (goalItem) => {
console.log(goalItem.id, relId, name);
await updateSharedStatusOfGoal(goalItem.id, relId, name);
}),
).catch((error) => {
console.error("[shareGoalWithRelId] Error updating shared status:", error);
});
});
}),
clearTheQueue(relId),
Expand Down

0 comments on commit 30ba34c

Please sign in to comment.