diff --git a/apps/findbobastore/src/app/page.tsx b/apps/findbobastore/src/app/page.tsx
index 21082cf..fd76582 100644
--- a/apps/findbobastore/src/app/page.tsx
+++ b/apps/findbobastore/src/app/page.tsx
@@ -1,4 +1,4 @@
-import { MapContainer } from '@/components/map-container'
+import { MapView } from '@/components/map-view'
export default async function Home() {
const mapboxToken = process.env.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN
@@ -7,7 +7,7 @@ export default async function Home() {
Find Boba Store
-
+
)
}
diff --git a/apps/findbobastore/src/components/map-container.tsx b/apps/findbobastore/src/components/map-container.tsx
deleted file mode 100644
index 2e76a6a..0000000
--- a/apps/findbobastore/src/components/map-container.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-'use client'
-
-import dynamic from 'next/dynamic'
-
-const MapView = dynamic(() => import('./map-view'), {
- ssr: false,
- loading: () => (
-
- ),
-})
-
-export function MapContainer({ token }: { token: string | undefined }) {
- return
-}
diff --git a/apps/findbobastore/src/components/map-view.tsx b/apps/findbobastore/src/components/map-view.tsx
index 360182f..5a56205 100644
--- a/apps/findbobastore/src/components/map-view.tsx
+++ b/apps/findbobastore/src/components/map-view.tsx
@@ -1,3 +1,5 @@
+'use client'
+
import { useCallback, memo, useState } from 'react'
import ReactMapGL, { Marker, NavigationControl, GeolocateControl } from 'react-map-gl'
import { motion, AnimatePresence } from 'framer-motion'
@@ -31,8 +33,7 @@ function MapOverlay({ store }: { store: BobaStore | null }) {
)
}
-export function MapView({ token }: { token: string | undefined }) {
- console.log({ token })
+export const MapView = memo(function MapView({ token }: { token: string | undefined }) {
const [selectedStore, setSelectedStore] = useState(null)
const [viewState, setViewState] = useState({
longitude: -122.4194,
@@ -114,7 +115,6 @@ export function MapView({ token }: { token: string | undefined }) {
))}
- {/* User location marker */}
{viewState.longitude !== -122.4194 && (
@@ -127,6 +127,4 @@ export function MapView({ token }: { token: string | undefined }) {
{locationError &&
{locationError}
}
)
-}
-
-export default memo(MapView)
+})