From f639bb07f4836742a6d964035cfef089560d2e7b Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Tue, 23 Sep 2025 09:14:01 -0700 Subject: [PATCH] Added menu options for cloud mode. Async fixes. --- src/app/(main)/pixels/PixelDeleteButton.tsx | 2 +- src/app/(main)/pixels/PixelEditButton.tsx | 2 +- src/app/(main)/pixels/PixelEditForm.tsx | 5 +-- .../(main)/pixels/[pixelId]/PixelHeader.tsx | 4 +-- src/app/(main)/pixels/[pixelId]/page.tsx | 4 +-- src/app/(main)/settings/SettingsLayout.tsx | 4 +-- .../[websiteId]/WebsiteExpandedView.tsx | 8 ++--- .../websites/[websiteId]/WebsiteNav.tsx | 4 +-- src/components/input/SegmentFilters.tsx | 2 ++ src/components/input/SettingsButton.tsx | 36 ++++++++++++++----- src/components/messages.ts | 2 ++ src/lib/constants.ts | 1 + 12 files changed, 47 insertions(+), 27 deletions(-) diff --git a/src/app/(main)/pixels/PixelDeleteButton.tsx b/src/app/(main)/pixels/PixelDeleteButton.tsx index 4e5024dd..c90261e5 100644 --- a/src/app/(main)/pixels/PixelDeleteButton.tsx +++ b/src/app/(main)/pixels/PixelDeleteButton.tsx @@ -17,7 +17,7 @@ export function PixelDeleteButton({ const { mutateAsync, isPending, error } = useDeleteQuery(`/pixels/${pixelId}`); const { touch } = useModified(); - const handleConfirm = (close: () => void) => { + const handleConfirm = async (close: () => void) => { await mutateAsync(null, { onSuccess: () => { touch('pixels'); diff --git a/src/app/(main)/pixels/PixelEditButton.tsx b/src/app/(main)/pixels/PixelEditButton.tsx index a1310d44..12977b81 100644 --- a/src/app/(main)/pixels/PixelEditButton.tsx +++ b/src/app/(main)/pixels/PixelEditButton.tsx @@ -9,7 +9,7 @@ export function PixelEditButton({ pixelId }: { pixelId: string }) { return ( }> - + {({ close }) => { return ; }} diff --git a/src/app/(main)/pixels/PixelEditForm.tsx b/src/app/(main)/pixels/PixelEditForm.tsx index 9caae764..a3a4f0c8 100644 --- a/src/app/(main)/pixels/PixelEditForm.tsx +++ b/src/app/(main)/pixels/PixelEditForm.tsx @@ -106,10 +106,7 @@ export function PixelEditForm({ allowCopy style={{ width: '100%' }} /> -