From b115131f4cf7dea486c8846bd7358705386b0924 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Tue, 23 Sep 2025 09:20:51 -0700 Subject: [PATCH] Fixed async issues. --- src/app/(main)/teams/[teamId]/TeamMemberRemoveButton.tsx | 2 +- .../(main)/websites/[websiteId]/cohorts/CohortDeleteButton.tsx | 2 +- .../websites/[websiteId]/segments/SegmentDeleteButton.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/(main)/teams/[teamId]/TeamMemberRemoveButton.tsx b/src/app/(main)/teams/[teamId]/TeamMemberRemoveButton.tsx index 708f8a27..22c871a3 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 7b7d0d1c..239193b0 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 2dd5e105..a588d11a 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');