File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change 11import { FC , PropsWithChildren } from "react" ;
22import { useDispatch , useSelector } from "react-redux" ;
33
4+ import { useActiveDataItem } from "@/hooks" ;
45import { deselectPaper } from "@/js/actions" ;
56
67import { getMapHeight } from "./selectors" ;
78
89export const HeightContainer : FC < PropsWithChildren > = ( { children } ) => {
10+ const { selectedItemId } = useActiveDataItem ( ) ;
911 const height = useSelector ( getMapHeight ) ;
1012 const dispatch = useDispatch ( ) ;
1113
1214 const handleMapClick = ( ) => {
15+ if ( ! selectedItemId ) return ;
16+
1317 dispatch ( deselectPaper ( ) ) ;
1418 } ;
1519
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { checkIsWithZoomControl } from "./selectors";
77
88export const ZoomControls : FC = ( ) => {
99 const isWithZoomControl = useSelector ( checkIsWithZoomControl ) ;
10+ console . log ( "Render in the ZoomControls component" ) ;
1011
1112 if ( ! isWithZoomControl ) {
1213 return null ;
You can’t perform that action at this time.
0 commit comments