diff options
-rw-r--r-- | modern/src/GeofencesPage.js | 6 | ||||
-rw-r--r-- | modern/src/MainPage.js | 13 | ||||
-rw-r--r-- | modern/src/components/registration/RegisterForm.js | 6 | ||||
-rw-r--r-- | modern/src/reports/ReportLayout.js | 6 | ||||
-rw-r--r-- | modern/src/settings/OptionsLayout/index.js | 5 |
5 files changed, 13 insertions, 23 deletions
diff --git a/modern/src/GeofencesPage.js b/modern/src/GeofencesPage.js index f16ea431..71219c16 100644 --- a/modern/src/GeofencesPage.js +++ b/modern/src/GeofencesPage.js @@ -1,11 +1,10 @@ import React from 'react'; import { - Divider, isWidthUp, makeStyles, withWidth, Typography, IconButton, useTheme, + Divider, isWidthUp, makeStyles, withWidth, Typography, IconButton, } from '@material-ui/core'; import Drawer from '@material-ui/core/Drawer'; import ContainerDimensions from 'react-container-dimensions'; import ArrowBackIcon from '@material-ui/icons/ArrowBack'; -import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; import Map from './map/Map'; import CurrentLocationMap from './map/CurrentLocationMap'; import GeofenceEditMap from './map/GeofenceEditMap'; @@ -50,7 +49,6 @@ const useStyles = makeStyles((theme) => ({ const GeofencesPage = ({ width }) => { const classes = useStyles(); - const theme = useTheme(); return ( <div className={classes.root}> @@ -62,7 +60,7 @@ const GeofencesPage = ({ width }) => { > <div className={classes.drawerHeader}> <IconButton component="a" href="/"> - {theme.direction === 'rtl' ? <ArrowForwardIcon /> : <ArrowBackIcon />} + <ArrowBackIcon /> </IconButton> <Typography variant="h6" color="inherit" noWrap> {t('sharedGeofences')} diff --git a/modern/src/MainPage.js b/modern/src/MainPage.js index 97f42ea3..e0707404 100644 --- a/modern/src/MainPage.js +++ b/modern/src/MainPage.js @@ -9,7 +9,6 @@ import useMediaQuery from '@material-ui/core/useMediaQuery'; import AddIcon from '@material-ui/icons/Add'; import CloseIcon from '@material-ui/icons/Close'; import ArrowBackIcon from '@material-ui/icons/ArrowBack'; -import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; import ListIcon from '@material-ui/icons/ViewList'; import DevicesList from './DevicesList'; @@ -132,9 +131,9 @@ const MainPage = () => { <Paper className={classes.paper} square elevation={3}> <Toolbar className={classes.toolbar} disableGutters> {isTablet && ( - <IconButton onClick={handleClose}> - {theme.direction === 'rtl' ? <ArrowForwardIcon /> : <ArrowBackIcon />} - </IconButton> + <IconButton onClick={handleClose}> + <ArrowBackIcon /> + </IconButton> )} <TextField fullWidth @@ -150,9 +149,9 @@ const MainPage = () => { <AddIcon /> </IconButton> {!isTablet && ( - <IconButton onClick={handleClose}> - <CloseIcon /> - </IconButton> + <IconButton onClick={handleClose}> + <CloseIcon /> + </IconButton> )} </Toolbar> </Paper> diff --git a/modern/src/components/registration/RegisterForm.js b/modern/src/components/registration/RegisterForm.js index 6260a0c5..06f53551 100644 --- a/modern/src/components/registration/RegisterForm.js +++ b/modern/src/components/registration/RegisterForm.js @@ -1,10 +1,9 @@ import React, { useState } from 'react'; import { - Grid, Button, TextField, Typography, Link, makeStyles, Snackbar, useTheme, + Grid, Button, TextField, Typography, Link, makeStyles, Snackbar, } from '@material-ui/core'; import { useHistory } from 'react-router-dom'; import ArrowBackIcon from '@material-ui/icons/ArrowBack'; -import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; import StartPage from '../../StartPage'; import t from '../../common/localization'; @@ -31,7 +30,6 @@ const RegisterForm = () => { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [snackbarOpen, setSnackbarOpen] = useState(false); - const theme = useTheme(); const submitDisabled = () => !name || !/(.+)@(.+)\.(.{2,})/.test(email) || !password; @@ -61,7 +59,7 @@ const RegisterForm = () => { <Grid item> <Typography className={classes.link} color="primary"> <Link onClick={() => history.push('/login')}> - {theme.direction === 'rtl' ? <ArrowForwardIcon /> : <ArrowBackIcon />} + <ArrowBackIcon /> </Link> </Typography> </Grid> diff --git a/modern/src/reports/ReportLayout.js b/modern/src/reports/ReportLayout.js index 48e77451..c231cd80 100644 --- a/modern/src/reports/ReportLayout.js +++ b/modern/src/reports/ReportLayout.js @@ -1,7 +1,7 @@ import React, { useState, useEffect } from 'react'; import { useHistory, useLocation } from 'react-router-dom'; import { - Grid, Typography, Divider, Drawer, makeStyles, IconButton, Hidden, useTheme, + Grid, Typography, Divider, Drawer, makeStyles, IconButton, Hidden, } from '@material-ui/core'; import TimelineIcon from '@material-ui/icons/Timeline'; import PauseCircleFilledIcon from '@material-ui/icons/PauseCircleFilled'; @@ -10,7 +10,6 @@ import NotificationsActiveIcon from '@material-ui/icons/NotificationsActive'; import FormatListBulletedIcon from '@material-ui/icons/FormatListBulleted'; import TrendingUpIcon from '@material-ui/icons/TrendingUp'; import ArrowBackIcon from '@material-ui/icons/ArrowBack'; -import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; import SideNav from '../components/SideNav'; import NavBar from '../components/NavBar'; @@ -67,7 +66,6 @@ const ReportLayout = ({ children, filter }) => { const location = useLocation(); const [openDrawer, setOpenDrawer] = useState(false); const [reportTitle, setReportTitle] = useState(); - const theme = useTheme(); useEffect(() => { routes.forEach((route) => { @@ -105,7 +103,7 @@ const ReportLayout = ({ children, filter }) => { <IconButton onClick={() => history.push('/')} > - {theme.direction === 'rtl' ? <ArrowForwardIcon /> : <ArrowBackIcon />} + <ArrowBackIcon /> </IconButton> <Typography variant="h6" color="inherit" noWrap> {t('reportTitle')} diff --git a/modern/src/settings/OptionsLayout/index.js b/modern/src/settings/OptionsLayout/index.js index 34721680..4a42e583 100644 --- a/modern/src/settings/OptionsLayout/index.js +++ b/modern/src/settings/OptionsLayout/index.js @@ -7,11 +7,9 @@ import { makeStyles, IconButton, Hidden, - useTheme, } from '@material-ui/core'; import ArrowBackIcon from '@material-ui/icons/ArrowBack'; -import ArrowForwardIcon from '@material-ui/icons/ArrowForward'; import SideNav from '../../components/SideNav'; import NavBar from '../../components/NavBar'; @@ -58,7 +56,6 @@ const OptionsLayout = ({ children }) => { const [openDrawer, setOpenDrawer] = useState(false); const [optionTitle, setOptionTitle] = useState(); const routes = useRoutes(); - const theme = useTheme(); useEffect(() => { const activeRoute = routes.find( @@ -90,7 +87,7 @@ const OptionsLayout = ({ children }) => { > <div className={classes.drawerHeader}> <IconButton component="a" href="/"> - {theme.direction === 'rtl' ? <ArrowForwardIcon /> : <ArrowBackIcon />} + <ArrowBackIcon /> </IconButton> <Typography variant="h6" color="inherit" noWrap> {t('settingsTitle')} |