From 18519ebadcc8447ae31f4c6bccaaa1c77dcf5bb4 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 22 May 2022 09:59:57 -0700 Subject: Clean up main page --- modern/src/main/MainPage.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'modern/src/main') diff --git a/modern/src/main/MainPage.js b/modern/src/main/MainPage.js index c6a0909b..61c10d81 100644 --- a/modern/src/main/MainPage.js +++ b/modern/src/main/MainPage.js @@ -121,8 +121,8 @@ const MainPage = () => { const t = useTranslation(); const deviceReadonly = useDeviceReadonly(); - const isTablet = useMediaQuery(theme.breakpoints.down('sm')); - const isPhone = useMediaQuery(theme.breakpoints.down('xs')); + const desktop = useMediaQuery(theme.breakpoints.up('md')); + const phone = useMediaQuery(theme.breakpoints.down('xs')); const [mapLiveRoutes] = usePersistedState('mapLiveRoutes', false); @@ -135,7 +135,7 @@ const MainPage = () => { setCollapsed(!collapsed); }; - useEffect(() => setCollapsed(isTablet), [isTablet]); + useEffect(() => setCollapsed(!desktop), [desktop]); return (
@@ -149,10 +149,10 @@ const MainPage = () => { - {!isTablet && } + {desktop && }
- {!isPhone && !isTablet && ( + {desktop && (
-- cgit v1.2.3