From 0e5dccbe97924a2592eb2e8419f6e36f080e5f0c Mon Sep 17 00:00:00 2001
From: Alberto Defendi <1369-ahl-berto@users.noreply.gitlab.inf.unibz.it>
Date: Tue, 22 Jun 2021 16:05:05 +0200
Subject: [PATCH] Remove container that was breaking childs style.

---
 src/components/Auth/Auth.tsx                  | 10 +++++++---
 src/components/Auth/SignInForm/SignInForm.tsx | 17 ++++-------------
 src/components/Auth/SignUpForm/SignUpForm.tsx | 14 ++++++++++----
 3 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/src/components/Auth/Auth.tsx b/src/components/Auth/Auth.tsx
index bd5dd6d..07e7e65 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 770f4f9..47d8344 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 872fb6e..5caa452 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>
   );
 };
-- 
GitLab