Skip to content

Commit

Permalink
refactored Map component to SVGMap
Browse files Browse the repository at this point in the history
  • Loading branch information
saanuregh committed Nov 3, 2020
1 parent 9d14d50 commit 3bff9d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions components/Home/HomeDistrictSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
} from "../../lib/constants";
import { useHomeDistrictStore } from "../../lib/stores";
import GraphCard from "./SubComponents/GraphCard";
import Map from "./SubComponents/Map";
import SVGMap from "./SubComponents/SVGMap";

type HomeDistrictSectionProps = {
districtHistories: Stats.DistrictHistories;
Expand Down Expand Up @@ -125,7 +125,7 @@ export default function HomeDistrictSection({
)}
</div>
{mapMode === MapMode.State ? (
<Map
<SVGMap
center={[76.2, 10.568_310_664_701_643]}
fill={(geo) =>
colorScale(
Expand All @@ -150,7 +150,7 @@ export default function HomeDistrictSection({
zoom={1.5}
/>
) : (
<Map
<SVGMap
center={DistrictProjConfig[selectedDistrict] || [0, 0]}
fill={(g) =>
hotspotsHistories[hotspotsHistories.length - 1].hotspots.find(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type MapProps = {
center: Point;
};

export default function Map({
export default function SVGMap({
geoJSON,
scale,
zoom = 1,
Expand Down

0 comments on commit 3bff9d6

Please sign in to comment.