[go: nahoru, domu]

Skip to content

Commit

Permalink
Revert switch
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanHam16 committed May 28, 2023
1 parent 02aade3 commit 7abdbdc
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions tecttitans-app/src/pages/Tour/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import getESGScore from "../../data/getESGScore";
import './Map.css';
import Scale from '../../components/Scale';
import { Typography } from '@mui/material';
import MapSwitch from '../../components/MapSwitch';

function getColor(esgScore) {
const colorScale = scaleQuantize()
Expand All @@ -25,12 +24,7 @@ function Map({ places, zoom, coordinates, setPlaceClicked, setPlaceDetailsState,
const [heading, setHeading] = useState(60);
const minZoom = 17.2;
const cardAnimationDelay = 100; // ms
const [mapId, setMapId] = useState(process.env.REACT_APP_GMAPS_ID);

const handleToggle = (isChecked) => {
const newMapId = isChecked ? process.env.REACT_APP_GMAPS_ID2 : process.env.REACT_APP_GMAPS_ID;
setMapId(newMapId);
};

function animate() {
setTilt((prevTilt) => {
Expand Down Expand Up @@ -102,7 +96,7 @@ function Map({ places, zoom, coordinates, setPlaceClicked, setPlaceDetailsState,
minZoom: minZoom,
heading: heading,
tilt: tilt,
mapId: mapId,
mapId: process.env.REACT_APP_GMAPS_ID,
}}
>
{places.map((place, i) => (
Expand Down Expand Up @@ -138,7 +132,6 @@ function Map({ places, zoom, coordinates, setPlaceClicked, setPlaceDetailsState,
</div>
))}
</GoogleMapReact>
<MapSwitch onToggle={handleToggle}/>
<Scale/>
</div>
);
Expand Down

0 comments on commit 7abdbdc

Please sign in to comment.