We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f61ee0 commit 8a26978Copy full SHA for 8a26978
vis/js/templates/Geomap/HeightContainer/index.tsx
@@ -1,15 +1,19 @@
1
import { FC, PropsWithChildren } from "react";
2
import { useDispatch, useSelector } from "react-redux";
3
4
+import { useActiveDataItem } from "@/hooks";
5
import { deselectPaper } from "@/js/actions";
6
7
import { getMapHeight } from "./selectors";
8
9
export const HeightContainer: FC<PropsWithChildren> = ({ children }) => {
10
+ const { selectedItemId } = useActiveDataItem();
11
const height = useSelector(getMapHeight);
12
const dispatch = useDispatch();
13
14
const handleMapClick = () => {
15
+ if (!selectedItemId) return;
16
+
17
dispatch(deselectPaper());
18
};
19
0 commit comments