Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Fixed async issues.

Mike Caob115131f4cf7
diff --git a/src/app/(main)/teams/[teamId]/TeamMemberRemoveButton.tsx b/src/app/(main)/teams/[teamId]/TeamMemberRemoveButton.tsx
index 708f8a27c..22c871a30 100644
--- a/src/app/(main)/teams/[teamId]/TeamMemberRemoveButton.tsx
+++ b/src/app/(main)/teams/[teamId]/TeamMemberRemoveButton.tsx
@@ -21,7 +21,7 @@ export function TeamMemberRemoveButton({
const { mutateAsync, isPending, error } = useDeleteQuery(`/teams/${teamId}/users/${userId}`);
const { touch } = useModified();
- const handleConfirm = (close: () => void) => {
+ const handleConfirm = async (close: () => void) => {
await mutateAsync(null, {
onSuccess: () => {
touch('teams:members');
diff --git a/src/app/(main)/websites/[websiteId]/cohorts/CohortDeleteButton.tsx b/src/app/(main)/websites/[websiteId]/cohorts/CohortDeleteButton.tsx
index 7b7d0d1cc..239193b0d 100644
--- a/src/app/(main)/websites/[websiteId]/cohorts/CohortDeleteButton.tsx
+++ b/src/app/(main)/websites/[websiteId]/cohorts/CohortDeleteButton.tsx
@@ -21,7 +21,7 @@ export function CohortDeleteButton({
`/websites/${websiteId}/segments/${cohortId}`,
);
- const handleConfirm = (close: () => void) => {
+ const handleConfirm = async (close: () => void) => {
await mutateAsync(null, {
onSuccess: () => {
touch('cohorts');
diff --git a/src/app/(main)/websites/[websiteId]/segments/SegmentDeleteButton.tsx b/src/app/(main)/websites/[websiteId]/segments/SegmentDeleteButton.tsx
index 2dd5e1053..a588d11a3 100644
--- a/src/app/(main)/websites/[websiteId]/segments/SegmentDeleteButton.tsx
+++ b/src/app/(main)/websites/[websiteId]/segments/SegmentDeleteButton.tsx
@@ -21,7 +21,7 @@ export function SegmentDeleteButton({
`/websites/${websiteId}/segments/${segmentId}`,
);
- const handleConfirm = (close: () => void) => {
+ const handleConfirm = async (close: () => void) => {
await mutateAsync(null, {
onSuccess: () => {
touch('segments');