From f6bb137ccf414ba36610c0ceea598c95683dce60 Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Fri, 3 Jul 2020 23:00:04 +0300
Subject: refactor: use mui-breakpoints

---
 src/components/Header/Header.tsx | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

(limited to 'src/components/Header/Header.tsx')

diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx
index c6c1608..e7f9f47 100644
--- a/src/components/Header/Header.tsx
+++ b/src/components/Header/Header.tsx
@@ -3,15 +3,16 @@ import {
   AppBar,
   Toolbar,
   IconButton,
-  Typography, Avatar
+  Typography,
+  Avatar,
+  useMediaQuery
 } from '@material-ui/core';
-import { makeStyles } from '@material-ui/core/styles';
+import { makeStyles, useTheme } from '@material-ui/core/styles';
 import AccountCircle from '@material-ui/icons/AccountCircle';
 import NotificationsIcon from '@material-ui/icons/Notifications';
 import HomeIcon from '@material-ui/icons/Home';
 import { useAuth } from '../../hooks/useAuth';
 import { useNavigate } from '../../hooks/useNavigate';
-import { isMobile } from 'react-device-detect';
 
 import SearchBar from './SearchBar';
 
@@ -43,6 +44,8 @@ const Header: React.FC = () => {
   const classes = useStyles();
   const { user } = useAuth();
   const { navigate } = useNavigate();
+  const theme = useTheme();
+  const isMobile = useMediaQuery(theme.breakpoints.down('sm'));
 
   const handleHome = (): void => {
     navigate('home');
-- 
cgit v1.2.3

