Skip to content

Commit

Permalink
fix: remove conditional render
Browse files Browse the repository at this point in the history
  • Loading branch information
gregkonush committed Dec 24, 2024
1 parent 1c55387 commit e691857
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/findbobastore/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default async function Home() {
<div className="absolute top-4 left-4 z-10 bg-slate-900/50 px-4 py-2 rounded-lg">
<h1 className="text-xl font-bold text-white">Find Boba Store</h1>
</div>
{mapboxToken && <MapContainer token={mapboxToken} />}
<MapContainer token={mapboxToken} />
</main>
)
}
2 changes: 1 addition & 1 deletion apps/findbobastore/src/components/map-container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ const MapView = dynamic(() => import('./map-view'), {
),
})

export function MapContainer({ token }: { token: string }) {
export function MapContainer({ token }: { token: string | undefined }) {
return <MapView token={token} />
}
2 changes: 1 addition & 1 deletion apps/findbobastore/src/components/map-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function MapOverlay({ store }: { store: BobaStore | null }) {
)
}

export function MapView({ token }: { token: string }) {
export function MapView({ token }: { token: string | undefined }) {
const mapContainer = useRef<HTMLDivElement>(null)
const map = useRef<mapboxgl.Map | null>(null)
const [selectedStore, setSelectedStore] = useState<BobaStore | null>(null)
Expand Down

0 comments on commit e691857

Please sign in to comment.