diff --git a/src/pages/MapPage.tsx b/src/pages/MapPage.tsx index cb4a14e..930995f 100644 --- a/src/pages/MapPage.tsx +++ b/src/pages/MapPage.tsx @@ -12,6 +12,7 @@ import { filterByTrustLevel, type TrustFilterLevel } from '@/lib/trustFilter'; import { SortDropdown, type SortOption } from '@/components/SortDropdown'; import { calculateDistance } from '@/lib/sortOptions'; import { useZapTotals, zapTargetKey } from '@/hooks/useZapTotals'; +import { useIsMobile } from '@/hooks/useIsMobile'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Badge } from '@/components/ui/badge'; @@ -603,7 +604,11 @@ export default function MapPage() { const [sortBy, setSortBy] = useState('recent'); // Seed from the cached last-known location so the "you are here" badge and // proximity sorting are available instantly; a fresh fix updates it. + // Mobile-only: Near Me is a mobile affordance, so desktop shows no location + // pin (or proximity sort). + const isMobile = useIsMobile(); const [userLocation, setUserLocation] = useState<{lat: number; lon: number} | null>(() => { + if (!isMobile) return null; const cached = getLastLocation(); return cached ? { lat: cached.lat, lon: cached.lng } : null; }); @@ -1635,7 +1640,7 @@ export default function MapPage() { showCrews={showCrews} showBtcMap={showBtcMap} flyTo={flyTo} - userLocation={userLocation ? { lat: userLocation.lat, lng: userLocation.lon } : null} + userLocation={isMobile && userLocation ? { lat: userLocation.lat, lng: userLocation.lon } : null} /> {/* Loading indicator — a slim, honest top bar. The map stays