From c5fe6253da026e1768374744840d8029d5e9d04b Mon Sep 17 00:00:00 2001 From: Marco Montanari Date: Mon, 7 Oct 2024 15:04:50 +0200 Subject: [PATCH] fix --- src/app/components/MapSearch/index.tsx | 72 +++++++++++++------------- 1 file changed, 35 insertions(+), 37 deletions(-) diff --git a/src/app/components/MapSearch/index.tsx b/src/app/components/MapSearch/index.tsx index fc5f257..b10f88b 100644 --- a/src/app/components/MapSearch/index.tsx +++ b/src/app/components/MapSearch/index.tsx @@ -76,7 +76,7 @@ export const ValueRenderer = ({ time, value, unit }) => { export const MapSearch: React.FunctionComponent = props => { const { - value, + value = { latlng: { lat: 0, lng: 0 } }, setPoint, openCharts, className, @@ -206,42 +206,40 @@ export const MapSearch: React.FunctionComponent = props => { /> - {value?.latlng && ( - - - - - - context.map.flyTo( - [value.latlng.lat, value.latlng.lng], - context.map.getZoom(), - ) - } - > - - - - - - - ), - }} - aria-label={'Centra la mappa'} - > - )} + + + + + + context.map.flyTo( + [value.latlng.lat, value.latlng.lng], + context.map.getZoom(), + ) + } + > + + + + + + + ), + }} + aria-label={'Centra la mappa'} + > );