diff --git a/apps/findbobastore/src/app/page.tsx b/apps/findbobastore/src/app/page.tsx index 828359b..68893f1 100644 --- a/apps/findbobastore/src/app/page.tsx +++ b/apps/findbobastore/src/app/page.tsx @@ -4,7 +4,7 @@ export default async function Home() { const mapboxToken = process.env.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN return (
-
+

Find Boba Store

{mapboxToken && } diff --git a/apps/findbobastore/src/components/map-view.tsx b/apps/findbobastore/src/components/map-view.tsx index 7283180..ea9fa0f 100644 --- a/apps/findbobastore/src/components/map-view.tsx +++ b/apps/findbobastore/src/components/map-view.tsx @@ -221,7 +221,7 @@ function MapOverlay({ store }: { store: BobaStore | null }) { animate={{ opacity: 1, y: 0 }} exit={{ opacity: 0, y: 20 }} className={cn( - 'absolute bottom-4 left-4 p-4 bg-slate-900/90 rounded-lg shadow-lg', + 'absolute bottom-4 left-4 p-4 bg-slate-900/40 rounded-lg shadow-lg', 'backdrop-blur-sm border border-slate-800', 'max-w-sm w-full z-10', )} @@ -238,7 +238,6 @@ function MapOverlay({ store }: { store: BobaStore | null }) { } export function MapView({ token }: { token: string }) { - mapboxgl.accessToken = token const mapContainer = useRef(null) const map = useRef(null) const [selectedStore, setSelectedStore] = useState(null) @@ -328,6 +327,7 @@ export function MapView({ token }: { token: string }) { center: location, zoom: 12, maxZoom: 15, + accessToken: token, }) map.current.on('load', () => { @@ -367,7 +367,7 @@ export function MapView({ token }: { token: string }) { trackUserLocation: true, }), ) - }, [getUserLocation, clearMarkers, addUserLocationMarker, addBobaMarkers]) + }, [getUserLocation, clearMarkers, addUserLocationMarker, addBobaMarkers, token]) useEffect(() => { if (!map.current) {