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. */}