Skip to content

Commit

Permalink
Merge pull request #26 from Alfex4936/develop
Browse files Browse the repository at this point in the history
Fix: Map control hook
  • Loading branch information
2YH02 authored Jun 4, 2024
2 parents 034343f + 4b27f8a commit e06d0cb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/public/sw.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions frontend/src/hooks/common/useMapControl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ import { MAP_LAT_DIF } from "@/constants";
import useMapStatusStore from "@/store/useMapStatusStore";
import useMapStore from "@/store/useMapStore";
import useMiniMapStatusStore from "@/store/useMiniMapStatusStore";
import useMobileMapOpenStore from "@/store/useMobileMapOpenStore";

const useMapControl = () => {
const { map, markers } = useMapStore();
const { setPosition } = useMapStatusStore();
const { open } = useMobileMapOpenStore();
const { map: miniMap } = useMiniMapStatusStore();

const filterMarker = async (markerId: number) => {
Expand Down Expand Up @@ -66,7 +64,6 @@ const useMapControl = () => {
);
setPosition((lat as number) + MAP_LAT_DIF, lng as number);
map?.panTo(moveLatLon);
open();
}

if (isfilter && markerId) filterMarker(markerId);
Expand Down

0 comments on commit e06d0cb

Please sign in to comment.