Skip to content

Commit

Permalink
refactor: rename areaId state variable
Browse files Browse the repository at this point in the history
  • Loading branch information
clintonlunn committed Nov 11, 2024
1 parent 7723635 commit 91e5c53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app/(maps)/components/FullScreenMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { MapLayerMouseEvent } from 'maplibre-gl'
export const FullScreenMap: React.FC = () => {
const [center, setCenter] = useState<[number, number] | undefined>(undefined)
const [zoom, setZoom] = useState<number | undefined>(undefined)
const [initialAreaId, setInitialAreaId] = useState<string | undefined>(undefined)
const [areaId, setAreaId] = useState<string | undefined>(undefined)
const [isInitialized, setIsInitialized] = useState(false)

const router = useRouter()
Expand All @@ -21,7 +21,7 @@ export const FullScreenMap: React.FC = () => {
const { areaId } = urlParams.fromUrl()

if (areaId !== null) {
setInitialAreaId(areaId)
setAreaId(areaId)
}

if (camera !== null) {
Expand Down Expand Up @@ -68,7 +68,7 @@ export const FullScreenMap: React.FC = () => {

return (
<GlobalMap
initialAreaId={initialAreaId}
initialAreaId={areaId}
initialCenter={center}
initialZoom={zoom}
onCameraMovement={handleCameraMovement}
Expand Down

0 comments on commit 91e5c53

Please sign in to comment.