diff --git a/src/components/Auth/Auth.tsx b/src/components/Auth/Auth.tsx index bd5dd6d8f45438dd7cc6eac1628953f7812e4360..07e7e659834cf5198582b8177730786769a8939f 100644 --- a/src/components/Auth/Auth.tsx +++ b/src/components/Auth/Auth.tsx @@ -5,6 +5,7 @@ import { AuthRoutes, NonAuthRoutes } from 'api/routes'; import { ChoseRole } from 'components/Auth/ChoseRole/ChoseRole'; import { SignInForm } from 'components/Auth/SignInForm/SignInForm'; import { SignUpForm } from 'components/Auth/SignUpForm/SignUpForm'; +import { ChoseRolePage } from 'components/Auth/ChoseRole/ChoseRolePage'; /** * Keeps all components related to SignIn/SignOut logic. @@ -12,10 +13,13 @@ import { SignUpForm } from 'components/Auth/SignUpForm/SignUpForm'; export const AuthUser: FC = () => { const { path } = useRouteMatch(); return ( - <Container maxWidth="sm"> + <> <Route path={`${path}${NonAuthRoutes.signIn}`} component={SignInForm} /> <Route path={`${path}${NonAuthRoutes.signUp}`} component={SignUpForm} /> - <Route path={`${path}${AuthRoutes.choseRole}`} component={ChoseRole} /> - </Container> + <Route + path={`${path}${AuthRoutes.choseRole}`} + component={ChoseRolePage} + /> + </> ); }; diff --git a/src/components/Auth/SignInForm/SignInForm.tsx b/src/components/Auth/SignInForm/SignInForm.tsx index 770f4f90c287c53d8510607dfbb7df38533035fd..47d83444f48e43505545df754448de56ea7fb344 100644 --- a/src/components/Auth/SignInForm/SignInForm.tsx +++ b/src/components/Auth/SignInForm/SignInForm.tsx @@ -1,17 +1,8 @@ -import React, { FC, useContext } from 'react'; -import axios from 'axios'; +import React, { FC } from 'react'; import { useCookie } from 'hooks/useCookie'; import { AuthRoutes, NonAuthRoutes } from 'api/routes'; import { SubmitHandler, useForm } from 'react-hook-form'; -import { - Button, - createMuiTheme, - responsiveFontSizes, - MuiThemeProvider, - Grid, - Typography, - Link, -} from '@material-ui/core'; +import { Button, Grid, Typography, Link, Container } from '@material-ui/core'; import { useHistory } from 'react-router-dom'; import { InputField } from 'components/Auth/InputField/InputField'; import { CredentialsType } from 'types/CredentialsType'; @@ -55,7 +46,7 @@ export const SignInForm: FC = () => { const classes = signInFormStyles(); return ( - <> + <Container maxWidth="sm"> <header> <Grid item container> <Grid item xs={12} color="primary" className={classes.paddingTop}> @@ -123,6 +114,6 @@ export const SignInForm: FC = () => { </Grid> </Grid> </form> - </> + </Container> ); }; diff --git a/src/components/Auth/SignUpForm/SignUpForm.tsx b/src/components/Auth/SignUpForm/SignUpForm.tsx index 872fb6e5918c7d6a492bb835494b87d5a64030f1..5caa452951e370f59e5f363850d5e6178aed1716 100644 --- a/src/components/Auth/SignUpForm/SignUpForm.tsx +++ b/src/components/Auth/SignUpForm/SignUpForm.tsx @@ -1,8 +1,14 @@ import React, { FC } from 'react'; import { SubmitHandler, useForm } from 'react-hook-form'; -import { Button, Grid, Typography, Link, Hidden } from '@material-ui/core'; +import { + Button, + Grid, + Typography, + Link, + Hidden, + Container, +} from '@material-ui/core'; import { NonAuthRoutes } from 'api/routes'; -import axios from 'axios'; import { InputField } from 'components/Auth/InputField/InputField'; import { registerSenior } from 'api/registerSenior'; import { RegisterSeniorType } from 'types/RegisterSeniorType'; @@ -19,7 +25,7 @@ export const SignUpForm: FC = () => { const classes = signUpFormStyle(); return ( - <> + <Container maxWidth="sm"> <header> <Grid item container> <Grid item xs={12} color="primary" className={classes.paddingTop}> @@ -219,6 +225,6 @@ export const SignUpForm: FC = () => { </Typography> </Grid> </Grid> - </> + </Container> ); };