From f74dedfce4ade65cfe023c973a6c137a56c88ab5 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Fri, 3 Jul 2020 22:09:54 +0300 Subject: feat: adapt HomePage for mobile devices --- src/pages/HomePage/HomePage.tsx | 4 ++-- src/pages/Page.tsx | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/pages/HomePage/HomePage.tsx b/src/pages/HomePage/HomePage.tsx index 8995630..35130d8 100644 --- a/src/pages/HomePage/HomePage.tsx +++ b/src/pages/HomePage/HomePage.tsx @@ -61,7 +61,7 @@ const HomePage: React.FC = () => { return ( - + logo @@ -76,7 +76,7 @@ const HomePage: React.FC = () => { - + Which one to choose? diff --git a/src/pages/Page.tsx b/src/pages/Page.tsx index 24487f3..c2b422e 100644 --- a/src/pages/Page.tsx +++ b/src/pages/Page.tsx @@ -1,6 +1,8 @@ import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; import { SnackbarProvider } from 'notistack'; +import { isMobile } from 'react-device-detect'; + import ProfilePage from './ProfilePage/ProfilePage'; import FeedPage from './FeedPage/FeedPage'; import AuthPage from './AuthPage/AuthPage'; @@ -8,9 +10,10 @@ import HomePage from './HomePage/HomePage'; import NotificationsPage from './NotificationsPage/NotificationsPage'; import { useNavigate } from '../hooks/useNavigate'; + const useStyles = makeStyles(theme => ({ root: { - margin: theme.spacing(15, 5, 5, 8) + margin: isMobile ? theme.spacing(5, 2) : theme.spacing(15, 5, 5, 8) } })); -- cgit v1.2.3