11import React from 'react'
22import { Route , Redirect } from 'react-router-dom' //
3- // import { makeStyles } from '@material-ui/core/styles'
3+ import { makeStyles } from '@material-ui/core/styles'
44
5- import Container from '@material-ui/core/Container'
6- import Typography from '@material-ui/core/Typography'
7- import Link from '@material-ui/core/Link'
5+ import { Grid , Typography , Link , Box , Hidden } from '@material-ui/core/'
86import { Link as RouterLink } from 'react-router-dom'
9- import Box from '@material-ui/core/Box'
107
118import Login from './Login'
129import Signup from './Signup'
@@ -24,38 +21,46 @@ function Footer() {
2421}
2522
2623export default function Auth ( { match } ) {
27- // const classes = useStyles()
24+ const classes = useStyles ( )
2825
2926 return (
30- < Container component = "main" maxWidth = "xs" >
31- < Redirect exact from = { `${ match . path } /` } to = { `${ match . path } /login` } />
32- < Route path = { `${ match . path } /login` } component = { Login } />
33- < Route path = { `${ match . path } /signup` } component = { Signup } />
34- < Route path = { `${ match . path } /recover` } component = { Recover } />
35- < Route path = { `${ match . path } /reset` } component = { Reset } />
36- < Box mt = { 8 } >
37- < Footer />
38- </ Box >
39- </ Container >
27+ < Grid container className = { classes . container } >
28+ < Grid item xs = { 12 } sm = { 12 } md = { 4 } className = { classes . formSection } >
29+ < Box p = { 2 } >
30+ < Redirect exact from = { `${ match . path } /` } to = { `${ match . path } /login` } />
31+ < Route path = { `${ match . path } /login` } component = { Login } />
32+ < Route path = { `${ match . path } /signup` } component = { Signup } />
33+ < Route path = { `${ match . path } /recover` } component = { Recover } />
34+ < Route path = { `${ match . path } /reset` } component = { Reset } />
35+ < Box mt = { 8 } >
36+ < Footer />
37+ </ Box >
38+ </ Box >
39+ </ Grid >
40+ < Grid item xs = { 12 } sm = { 12 } md = { 8 } className = { classes . introSection } > </ Grid >
41+ </ Grid >
4042 )
4143}
4244
43- // const useStyles = makeStyles(theme => ({
44- // paper: {
45- // marginTop: theme.spacing(8),
46- // display: 'flex',
47- // flexDirection: 'column',
48- // alignItems: 'center',
49- // },
50- // avatar: {
51- // margin: theme.spacing(1),
52- // backgroundColor: theme.palette.secondary.main,
53- // },
54- // form: {
55- // width: '100%', // Fix IE 11 issue.
56- // marginTop: theme.spacing(1),
57- // },
58- // submit: {
59- // margin: theme.spacing(3, 0, 2),
60- // },
61- // }))
45+ const useStyles = makeStyles ( theme => ( {
46+ container : {
47+ minHeight : '100vh' ,
48+ } ,
49+ formSection : {
50+ display : 'flex' ,
51+ justifyContent : 'center' ,
52+ alignItems : 'center' ,
53+ } ,
54+ introSection : {
55+ display : 'flex' ,
56+ justifyContent : 'center' ,
57+ alignItems : 'center' ,
58+ backgroundImage : 'url(/background-auth.jpg)' ,
59+ backgroundSize : 'cover' ,
60+ backgroundPosition : 'right' ,
61+ backgroundRepeat : 'no-repeat' ,
62+ [ theme . breakpoints . down ( 'sm' ) ] : {
63+ display : 'none' ,
64+ } ,
65+ } ,
66+ } ) )
0 commit comments