From c0ee70b8bb8cb7c2a863f65fae725827fb85e0a8 Mon Sep 17 00:00:00 2001 From: SkateSpots Date: Sat, 26 Sep 2026 19:03:29 +0700 Subject: [PATCH] fix(ux): map empty state; marketplace-aware CreateListing return - Map view now shows a 'No spots match / Clear filters' overlay when the active filters hide everything (it previously looked blank/unloaded) - 'List Gear' passes returnTo=/marketplace, so the back link and the post-publish redirect return to Marketplace instead of dumping users on the map --- src/pages/CreateListingPage.tsx | 8 +++++--- src/pages/GearSwapPage.tsx | 2 +- src/pages/MapPage.tsx | 15 +++++++++++++++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/pages/CreateListingPage.tsx b/src/pages/CreateListingPage.tsx index 7deb4ea..3197449 100644 --- a/src/pages/CreateListingPage.tsx +++ b/src/pages/CreateListingPage.tsx @@ -85,6 +85,8 @@ export default function CreateListingPage() { // Check if coming from stash const fromStash = searchParams.get('fromStash') === 'true'; + // Where to return after publishing / when going back (e.g. /marketplace). + const returnTo = searchParams.get('returnTo') || ''; const stashId = searchParams.get('stashId'); // Form state - initialize from URL params if coming from stash @@ -353,7 +355,7 @@ export default function CreateListingPage() { if (selectedSpot) { navigate(`/spot/${selectedSpot.pubkey}/${selectedSpot.identifier}`); } else { - navigate('/map'); + navigate(returnTo || '/map'); } } catch (error) { toast({ @@ -386,11 +388,11 @@ export default function CreateListingPage() {
- {fromStash ? 'Back to Stash' : (selectedSpot ? `Back to ${selectedSpot.title}` : 'Back to Map')} + {fromStash ? 'Back to Stash' : (selectedSpot ? `Back to ${selectedSpot.title}` : (returnTo === '/marketplace' ? 'Back to Marketplace' : 'Back to Map'))}

- + +
+ + )} + {/* Map attribution — bottom-left, sits ABOVE the mobile bottom nav so it never covers the Shops & Spots buttons. Tiny + subtle. */}