From a40c86e655012003ceda245f8209ef342dd0d428 Mon Sep 17 00:00:00 2001 From: "shakespeare.diy" Date: Thu, 10 Sep 2026 18:50:34 +0700 Subject: [PATCH] =?UTF-8?q?Map=20pins:=20use=20a=20single=20generic=20?= =?UTF-8?q?=F0=9F=9B=B9=20glyph=20instead=20of=20per-category=20emojis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaced the per-category emoji map (street/park/DIY/plaza/transition) with one generic skateboard glyph on every spot pin, per request. The pin's crisp shape, tight halo and shelter roof-cap (covered/indoor) are unchanged. Dropped the now- unused `category` option from createSkateSpotIcon and its call sites. Build clean; the earlier "CATEGORY_GLYPH is not defined" console errors were from a stale intermediate bundle and do not occur in the current build. Co-authored-by: shakespeare.diy --- src/components/SpotMap.tsx | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/components/SpotMap.tsx b/src/components/SpotMap.tsx index ac0a0e2..c20d8f8 100644 --- a/src/components/SpotMap.tsx +++ b/src/components/SpotMap.tsx @@ -64,19 +64,14 @@ const defaultIcon = L.icon({ L.Marker.prototype.options.icon = defaultIcon; /** Emoji glyph per spot category — turns the map into a readable language. */ -const CATEGORY_GLYPH: Record = { - street: '🛹', - park: '🏞️', - diy: '🔧', - plaza: '🏛️', - transition: '🌊', -}; +/** A single generic glyph for every skate-spot pin (kept intentionally simple). */ +const SPOT_GLYPH = '🛹'; /** * Crisp skate-spot marker: a solid neon teardrop with a TIGHT glow halo (the - * glow is an accent, not the whole blob), a category emoji inside so the pin is - * readable at a glance, and — for covered/indoor spots — a small roof "cap" so - * dry spots literally stand out on a rainy day. + * glow is an accent, not the whole blob), a generic skate glyph inside, and — + * for covered/indoor spots — a small roof "cap" so dry spots literally stand + * out on a rainy day. * * `weatherColor`/`weatherIcon` (when the weather layer is on) still override the * fill + add the condition badge, exactly as before. @@ -84,16 +79,15 @@ const CATEGORY_GLYPH: Record = { const createSkateSpotIcon = (opts?: { weatherColor?: string; weatherIcon?: string; - category?: string; shelter?: 'outdoor' | 'partial' | 'covered' | 'indoor'; }) => { - const { weatherColor, weatherIcon, category, shelter } = opts ?? {}; + const { weatherColor, weatherIcon, shelter } = opts ?? {}; const fill = weatherColor ? `background: ${weatherColor};` : 'background: linear-gradient(135deg, #ff0040, #ff6600);'; const glowColor = weatherColor || '#ff0040'; - const glyph = (category && CATEGORY_GLYPH[category]) || '🛹'; + const glyph = SPOT_GLYPH; const isSheltered = shelter === 'covered' || shelter === 'indoor'; // Roof cap for covered/indoor spots — a small cyan "dry" marker that sits @@ -1098,7 +1092,6 @@ export function SpotMap({ icon = createSkateSpotIcon({ weatherColor: spotWeather?.skateability.color, weatherIcon: spotWeather?.weather.weatherIcon, - category: primarySpot?.category, shelter: primarySpot?.shelter, }); } else if (!hasSpots && hasGear) { @@ -1110,7 +1103,6 @@ export function SpotMap({ icon = createSkateSpotIcon({ weatherColor: spotWeather?.skateability.color, weatherIcon: spotWeather?.weather.weatherIcon, - category: primarySpot?.category, shelter: primarySpot?.shelter, }); }