File tree Expand file tree Collapse file tree 1 file changed +0
-15
lines changed
Expand file tree Collapse file tree 1 file changed +0
-15
lines changed Original file line number Diff line number Diff line change @@ -376,7 +376,6 @@ function SmallScreenLayout({
376376 const hasPath = route . selectedPath . points . coordinates . length > 0
377377 const settings = useContext ( SettingsContext )
378378
379- const isShortScreen = useMediaQuery ( { query : '(max-height: 40rem)' } )
380379 const [ isFooterCollapsed , setIsFooterCollapsed ] = useState ( false )
381380 const footerRef = useRef < HTMLDivElement > ( null )
382381
@@ -385,20 +384,6 @@ function SmallScreenLayout({
385384 if ( hasPath ) setIsFooterCollapsed ( false )
386385 } , [ route . routingResult . paths ] )
387386
388- // Auto-collapse on map interaction (only on short screens)
389- useEffect ( ( ) => {
390- if ( ! isShortScreen ) return
391- const handleClick = ( e : Event ) => {
392- if ( ! ( e . target instanceof Node && footerRef . current ?. contains ( e . target ) ) && hasPath )
393- setIsFooterCollapsed ( true )
394- }
395- window . addEventListener ( 'mousedown' , handleClick )
396- window . addEventListener ( 'touchstart' , handleClick )
397- return ( ) => {
398- window . removeEventListener ( 'mousedown' , handleClick )
399- window . removeEventListener ( 'touchstart' , handleClick )
400- }
401- } )
402387
403388 return (
404389 < >
You can’t perform that action at this time.
0 commit comments