Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lil5 committed Jul 5, 2024
1 parent 8279003 commit d82cf35
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/src/components/RouteMap/RouteMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { type RouteCoordinate, routeCoordinates } from "../../api/route";
import type { Chain, UID } from "../../api/types";
import type { FeatureCollection, Polygon, Feature } from "geojson";
import { useMapZoom } from "./utils";
import { useTranslation } from "react-i18next";

import { IonFab, IonFabButton, IonIcon } from "@ionic/react";
import {
Expand All @@ -22,7 +21,11 @@ const MAX_ZOOM_HOST = 18;
const MIN_ZOOM = 4;
const KEY_ROUTE_MAP_LINE = "route_map_line";

export default function RouteMap(props: { chain: Chain; authUserUID: UID, isChainAdmin: boolean}) {
export default function RouteMap(props: {
chain: Chain;
authUserUID: UID;
isChainAdmin: boolean;
}) {
const [map, setMap] = useState<mapboxjs.Map>();
const { zoom, setZoom, mapZoom } = useMapZoom(11, MIN_ZOOM, MAX_ZOOM);
const [id] = useState(() => window.crypto.randomUUID());
Expand All @@ -39,7 +42,7 @@ export default function RouteMap(props: { chain: Chain; authUserUID: UID, isChai
center: [props.chain.longitude, props.chain.latitude],
zoom: 11,
minZoom: MIN_ZOOM,
maxZoom: props.isChainAdmin? MAX_ZOOM_HOST:MAX_ZOOM,
maxZoom: props.isChainAdmin ? MAX_ZOOM_HOST : MAX_ZOOM,
});
setZoom(11);
_map.on("load", () => {
Expand Down

0 comments on commit d82cf35

Please sign in to comment.