diff --git a/package.json b/package.json index 688716d..76ef175 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "skate-spots", "private": true, - "version": "1.2.25", + "version": "1.2.26", "type": "module", "homepage": "https://skate-spots.com", "scripts": { diff --git a/src/pages/CreateSpotPage.tsx b/src/pages/CreateSpotPage.tsx index ec86096..a045e60 100644 --- a/src/pages/CreateSpotPage.tsx +++ b/src/pages/CreateSpotPage.tsx @@ -239,6 +239,25 @@ export default function CreateSpotPage() { return; } + if (!selectedCategory) { + toast({ + title: 'Spot type required', + description: 'Please pick a spot type so skaters know what they’re rolling up to.', + variant: 'destructive', + }); + return; + } + + // Don't publish while the Quick Snap photo is still uploading — otherwise the + // spot would go out without the photo the user just took. + if (isUploadingQuickPhoto) { + toast({ + title: 'Hang tight', + description: 'Your photo is still uploading. It’ll be attached in a second.', + }); + return; + } + try { // Generate geohash from coordinates (7 chars = ~153m precision) const geohash = ngeohash.encode(lat, lng, 7); @@ -322,12 +341,6 @@ export default function CreateSpotPage() { // Add alt tag for NIP-31 (human-readable description) eventTags.push(['alt', `Skate spot: ${title.trim()}`]); - console.log('Publishing spot event:', { - kind: SKATE_SPOT_KIND, - tags: eventTags, - content: description.trim() - }); - await createEvent({ kind: SKATE_SPOT_KIND, content: description.trim(), @@ -696,13 +709,18 @@ export default function CreateSpotPage() {