Skip to content

Commit

Permalink
fix: no zoom buttons on mobile (#279)
Browse files Browse the repository at this point in the history
* no zoom buttons on mobile

* Restyled by prettier (#280)

Co-authored-by: Restyled.io <[email protected]>

Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com>
Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
3 people authored Oct 29, 2020
1 parent a4a3404 commit d4fc7db
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/CovMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import moment from "moment";
import { useHistory, useParams } from "react-router-dom";
import { useTranslation } from "react-i18next";
import { FeatureCollection } from "geojson";
import { useMediaQuery } from "@material-ui/core";

import { State } from "../state";
import { AppApi } from "../state/app";
Expand Down Expand Up @@ -75,6 +76,7 @@ export const CovMap = () => {
const dispatch = useThunkDispatch();
const urlParams = useParams<{ subPage?: string }>();
const history = useHistory();
const isMobile = useMediaQuery("(max-width:600px)");
// const position = useSelector((state: State) => state.app.currentPosition); // TODO
const currentVisual = useSelector((state: State) => state.app.currentVisual);
const datasetFound = useSelector((state: State) => state.app.datasetFound);
Expand Down Expand Up @@ -280,7 +282,7 @@ export const CovMap = () => {
</Typography>
</div>
{config.showSettings === false ? null : <Settings />}
<Zoom />
{!isMobile && <Zoom />}
<TopLeftContainer>
{visual.InfoComponent ? <WelcomeInfoButton /> : null}
<OfflineIndicator />
Expand Down

0 comments on commit d4fc7db

Please sign in to comment.