@@ -88,7 +88,6 @@ type Props = {
8888 setMainPanelContent : ( content : number ) => void
8989 setNearbyViewFilter : ( arg : NearbyFilters ) => void
9090 setViewedNearbyCoords : ( location : Location | null ) => void
91- setViewedRoute : ( ) => void
9291 zoomToPlace : ZoomToPlaceHandler
9392}
9493
@@ -182,7 +181,6 @@ function NearbyView({
182181 setMainPanelContent,
183182 setNearbyViewFilter,
184183 setViewedNearbyCoords,
185- setViewedRoute,
186184 zoomToPlace
187185} : Props ) : JSX . Element {
188186 const map = useMap ( ) . default
@@ -202,11 +200,6 @@ function NearbyView({
202200 [ nearbyViewCoords , currentPosition , map ]
203201 )
204202
205- // Clear viewed route when entering nearby view
206- useEffect ( ( ) => {
207- setViewedRoute ( )
208- } , [ setViewedRoute ] )
209-
210203 const reverseCoords = async ( coords : LonLatInput ) => {
211204 try {
212205 const location = await getGeocoder ( geocoderConfig ) . reverse ( {
@@ -575,7 +568,6 @@ const mapDispatchToProps = {
575568 setMainPanelContent : uiActions . setMainPanelContent ,
576569 setNearbyViewFilter : uiActions . setNearbyViewFilter ,
577570 setViewedNearbyCoords : uiActions . setViewedNearbyCoords ,
578- setViewedRoute : uiActions . setViewedRoute ,
579571 viewNearby : uiActions . viewNearby ,
580572 zoomToPlace : mapActions . zoomToPlace
581573}
0 commit comments