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 9e95458 commit 7f61ee0Copy full SHA for 7f61ee0
vis/js/templates/Geomap/HeightContainer/index.tsx
@@ -1,10 +1,21 @@
1
import { FC, PropsWithChildren } from "react";
2
-import { useSelector } from "react-redux";
+import { useDispatch, useSelector } from "react-redux";
3
+
4
+import { deselectPaper } from "@/js/actions";
5
6
import { getMapHeight } from "./selectors";
7
8
export const HeightContainer: FC<PropsWithChildren> = ({ children }) => {
9
const height = useSelector(getMapHeight);
10
+ const dispatch = useDispatch();
11
12
+ const handleMapClick = () => {
13
+ dispatch(deselectPaper());
14
+ };
15
- return <div style={{ height }}>{children}</div>;
16
+ return (
17
+ <div style={{ height }} onClick={handleMapClick}>
18
+ {children}
19
+ </div>
20
+ );
21
};
0 commit comments