From 8394d006dd9ff5c0a2149647713a6c170c7033a3 Mon Sep 17 00:00:00 2001 From: SkateSpots Date: Tue, 29 Sep 2026 17:56:01 +0700 Subject: [PATCH] fix(map): one close button on the spot sheet SheetContent renders a built-in close X, and SpotBottomSheet adds its own in the header row - so tapping a spot showed two. Added an opt-in hideClose prop to SheetContent and used it on the spot sheet (which keeps its own, placed in the header). Also padded the new mint sheet header clear of the built-in close. --- src/components/ui/sheet.tsx | 17 +++++++++++------ src/pages/MapPage.tsx | 1 + src/pages/MintsPage.tsx | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/components/ui/sheet.tsx b/src/components/ui/sheet.tsx index 9bc92af..0c4e966 100644 --- a/src/components/ui/sheet.tsx +++ b/src/components/ui/sheet.tsx @@ -49,12 +49,15 @@ const sheetVariants = cva( interface SheetContentProps extends React.ComponentPropsWithoutRef, - VariantProps { } + VariantProps { + /** Hide the built-in close button — for sheets that render their own. */ + hideClose?: boolean; +} const SheetContent = React.forwardRef< React.ElementRef, SheetContentProps ->(({ side = "right", className, children, ...props }, ref) => ( +>(({ side = "right", className, children, hideClose = false, ...props }, ref) => ( {children} - - - Close - + {!hideClose && ( + + + Close + + )} )) diff --git a/src/pages/MapPage.tsx b/src/pages/MapPage.tsx index cf1d5c9..a2d654a 100644 --- a/src/pages/MapPage.tsx +++ b/src/pages/MapPage.tsx @@ -2058,6 +2058,7 @@ export default function MapPage() { { if (!open) setSelectedSpot(null); }}> {selectedSpot?.title ?? 'Spot details'} diff --git a/src/pages/MintsPage.tsx b/src/pages/MintsPage.tsx index f26cd0d..25f70f8 100644 --- a/src/pages/MintsPage.tsx +++ b/src/pages/MintsPage.tsx @@ -320,7 +320,7 @@ export default function MintsPage() { {selected && ( <> -
+
{selected.iconUrl ? (