From e68d60d60880f4b1e847f7b092210fadfe5d6ab5 Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Tue, 16 Jun 2020 20:08:01 +0300
Subject: refactor: restructure components

---
 src/pages/AuthPage/SignInForm.tsx | 21 ++-------------------
 1 file changed, 2 insertions(+), 19 deletions(-)

(limited to 'src/pages/AuthPage/SignInForm.tsx')

diff --git a/src/pages/AuthPage/SignInForm.tsx b/src/pages/AuthPage/SignInForm.tsx
index ae75541..c521abf 100644
--- a/src/pages/AuthPage/SignInForm.tsx
+++ b/src/pages/AuthPage/SignInForm.tsx
@@ -5,35 +5,26 @@ import Button from '@material-ui/core/Button';
 
 interface PropTypes {
   logIn: (name: string, password: string) => Promise<boolean>;
-  setAuth: (auth: string) => void;
 }
 
 const useStyles = makeStyles(theme => ({
   root: {
     '& > *': {
       margin: theme.spacing(1),
-      width: '25ch'
+      width: theme.spacing(35)
     },
     display: 'flex',
     flexDirection: 'column',
     alignItems: 'center',
     textAlign: 'center'
   },
-  formTransfer: {
-    display: 'flex',
-    justifyContent: 'center'
-  },
-  transferButton: {
-    marginLeft: 10,
-    color: 'green'
-  },
   formHeader: {
     textAlign: 'center',
     fontSize: 25
   }
 }));
 
-const SignInForm: React.FC<PropTypes> = ({ logIn, setAuth }) => {
+const SignInForm: React.FC<PropTypes> = ({ logIn }) => {
   const [error, setError] = useState<boolean>(false);
   const classes = useStyles();
   const nameRef = useRef<HTMLInputElement>();
@@ -49,10 +40,6 @@ const SignInForm: React.FC<PropTypes> = ({ logIn, setAuth }) => {
     }
   };
 
-  const handleSignUp = () => {
-    setAuth('signUp');
-  };
-
   return (
     <>
       <div className={classes.formHeader}>Sign In</div>
@@ -71,10 +58,6 @@ const SignInForm: React.FC<PropTypes> = ({ logIn, setAuth }) => {
         />
         <Button variant="contained" onClick={onClick}>submit</Button>
       </form>
-      <div className={classes.formTransfer}>
-        <div>Don`t have an account?</div>
-        <div onClick={handleSignUp} className={classes.transferButton}>Sign Up</div>
-      </div>
     </>
   );
 };
-- 
cgit v1.2.3

