Skip to content

Commit

Permalink
Fix map zoomControl displayed on mobile viewport
Browse files Browse the repository at this point in the history
  • Loading branch information
dtrucs committed Oct 28, 2024
1 parent 4284e8f commit 1a33f08
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/components/Map/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ const SearchMapDynamicComponentWithoutMemo: React.FC<SearchMapProps> = props =>
);
};

export const SearchMapDynamicComponent = memo(SearchMapDynamicComponentWithoutMemo, () => true);
export const SearchMapDynamicComponent = memo(
SearchMapDynamicComponentWithoutMemo,
(oldProps, nextProps) => oldProps.hasZoomControl === nextProps.hasZoomControl,
);

const DetailsMapDynamicComponentWithoutMemo: React.FC<DetailsMapProps> = props => {
const DetailsMap = dynamic(() => import('./DetailsMap/DetailsMap'), {
Expand Down

0 comments on commit 1a33f08

Please sign in to comment.