From 14975dd481b6f7d0fd197b01410a38303cac5b79 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 1 Jun 2021 11:58:19 -0700 Subject: Logo coloring --- modern/src/LoginPage.js | 10 +++++++--- modern/src/components/LoginForm.js | 12 ++++++++---- 2 files changed, 15 insertions(+), 7 deletions(-) (limited to 'modern/src') diff --git a/modern/src/LoginPage.js b/modern/src/LoginPage.js index 3d4b17f..54994f4 100644 --- a/modern/src/LoginPage.js +++ b/modern/src/LoginPage.js @@ -13,6 +13,7 @@ const useStyles = makeStyles(theme => ({ display: 'flex', justifyContent: 'center', alignItems: 'center', + color: theme.palette.secondary.contrastText, background: theme.palette.common.purple, paddingBottom: theme.spacing(5), width: theme.dimensions.sidebarWidth, @@ -46,16 +47,19 @@ const LoginPage = () => { const theme = useTheme(); const [CurrentForm, setCurrentForm] = useState(() => LoginForm); - const matches = useMediaQuery(theme.breakpoints.down('md')); return (
- {!matches && Traccar } + {!useMediaQuery(theme.breakpoints.down('md')) && + + + + }
- +
diff --git a/modern/src/components/LoginForm.js b/modern/src/components/LoginForm.js index d52a51d..bb76213 100644 --- a/modern/src/components/LoginForm.js +++ b/modern/src/components/LoginForm.js @@ -11,6 +11,7 @@ import ResetPasswordForm from './ResetPasswordForm'; const useStyles = makeStyles(theme => ({ logoContainer: { textAlign: 'center', + color: theme.palette.primary.main, }, resetPassword: { cursor: 'pointer', @@ -28,7 +29,6 @@ const LoginForm = ({ setCurrentForm }) => { const dispatch = useDispatch(); const history = useHistory(); const theme = useTheme(); - const matches = useMediaQuery(theme.breakpoints.down('md')); const [failed, setFailed] = useState(false); const [email, setEmail] = useState(''); @@ -58,9 +58,13 @@ const LoginForm = ({ setCurrentForm }) => { return ( - - {matches && Traccar} - + {useMediaQuery(theme.breakpoints.down('md')) && + + + + + + }