From 8b57cdd86145d6e17c651b3646133641e65270e2 Mon Sep 17 00:00:00 2001
From: ilyayudovin <ilyayudovin123@gmail.com>
Date: Mon, 15 Jun 2020 18:41:33 +0300
Subject: fix: resolve conflicts

---
 src/pages/AuthPage/SignInForm.tsx | 1 -
 1 file changed, 1 deletion(-)

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

diff --git a/src/pages/AuthPage/SignInForm.tsx b/src/pages/AuthPage/SignInForm.tsx
index 1d4ce0e..e2ae8b7 100644
--- a/src/pages/AuthPage/SignInForm.tsx
+++ b/src/pages/AuthPage/SignInForm.tsx
@@ -38,7 +38,6 @@ const SignInForm: React.FC<PropTypes> = ({ logIn }) => {
 
   return (
     <form className={classes.root} noValidate autoComplete="off">
-      <h1>Sign In</h1>
       <TextField
         inputRef={nameRef}
         error={error}
-- 
cgit v1.2.3


From 181d40fab14c9170a7bbd9fe1782db727f5b19d6 Mon Sep 17 00:00:00 2001
From: ilyayudovin <ilyayudovin123@gmail.com>
Date: Tue, 16 Jun 2020 15:14:40 +0300
Subject: add form transfer to signIn and signUp

---
 src/pages/AuthPage/SignInForm.tsx | 60 +++++++++++++++++++++++++++------------
 1 file changed, 42 insertions(+), 18 deletions(-)

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

diff --git a/src/pages/AuthPage/SignInForm.tsx b/src/pages/AuthPage/SignInForm.tsx
index e2ae8b7..f4f763c 100644
--- a/src/pages/AuthPage/SignInForm.tsx
+++ b/src/pages/AuthPage/SignInForm.tsx
@@ -1,10 +1,11 @@
-import React, { useState, useRef } from 'react';
-import { makeStyles } from '@material-ui/core/styles';
+import React, {useState, useRef} from 'react';
+import {makeStyles} from '@material-ui/core/styles';
 import TextField from '@material-ui/core/TextField';
 import Button from '@material-ui/core/Button';
 
 interface PropTypes {
   logIn: (name: string, password: string) => Promise<boolean>;
+  setAuthorization: (authorization: { authorize: string }) => void ;
 }
 
 const useStyles = makeStyles(theme => ({
@@ -17,10 +18,22 @@ const useStyles = makeStyles(theme => ({
     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 }) => {
+const SignInForm: React.FC<PropTypes> = ({logIn, setAuthorization}) => {
   const [error, setError] = useState<boolean>(false);
   const classes = useStyles();
   const nameRef = useRef<HTMLInputElement>();
@@ -36,22 +49,33 @@ const SignInForm: React.FC<PropTypes> = ({ logIn }) => {
     }
   };
 
+  const handleSignUp = () => {
+    setAuthorization({authorize: 'signUp'});
+  };
+
   return (
-    <form className={classes.root} noValidate autoComplete="off">
-      <TextField
-        inputRef={nameRef}
-        error={error}
-        label="Login"
-      />
-      <TextField
-        inputRef={passwordRef}
-        error={error}
-        helperText={error && 'Invalid credentials'}
-        label="Password"
-        type="password"
-      />
-      <Button variant="contained" onClick={onClick}>submit</Button>
-    </form>
+    <>
+    <div className={classes.formHeader}>Sign In</div>
+      <form className={classes.root} noValidate autoComplete="off">
+        <TextField
+          inputRef={nameRef}
+          error={error}
+          label="Login"
+        />
+        <TextField
+          inputRef={passwordRef}
+          error={error}
+          helperText={error && 'Invalid credentials'}
+          label="Password"
+          type="password"
+        />
+        <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


From ad91510c6d0a600cb19678e6f3dd64f66656e01a Mon Sep 17 00:00:00 2001
From: ilyayudovin <ilyayudovin123@gmail.com>
Date: Tue, 16 Jun 2020 17:24:29 +0300
Subject: fix: clear eslint errors

---
 src/pages/AuthPage/SignInForm.tsx | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

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

diff --git a/src/pages/AuthPage/SignInForm.tsx b/src/pages/AuthPage/SignInForm.tsx
index f4f763c..cf68493 100644
--- a/src/pages/AuthPage/SignInForm.tsx
+++ b/src/pages/AuthPage/SignInForm.tsx
@@ -1,11 +1,11 @@
-import React, {useState, useRef} from 'react';
-import {makeStyles} from '@material-ui/core/styles';
+import React, { useState, useRef } from 'react';
+import { makeStyles } from '@material-ui/core/styles';
 import TextField from '@material-ui/core/TextField';
 import Button from '@material-ui/core/Button';
 
 interface PropTypes {
   logIn: (name: string, password: string) => Promise<boolean>;
-  setAuthorization: (authorization: { authorize: string }) => void ;
+  setAuthorization: (authorization: { authorize: string }) => void;
 }
 
 const useStyles = makeStyles(theme => ({
@@ -21,11 +21,11 @@ const useStyles = makeStyles(theme => ({
   },
   formTransfer: {
     display: 'flex',
-   justifyContent: 'center'
+    justifyContent: 'center'
   },
   transferButton: {
     marginLeft: 10,
-   color: 'green'
+    color: 'green'
   },
   formHeader: {
     textAlign: 'center',
@@ -33,7 +33,7 @@ const useStyles = makeStyles(theme => ({
   }
 }));
 
-const SignInForm: React.FC<PropTypes> = ({logIn, setAuthorization}) => {
+const SignInForm: React.FC<PropTypes> = ({ logIn, setAuthorization }) => {
   const [error, setError] = useState<boolean>(false);
   const classes = useStyles();
   const nameRef = useRef<HTMLInputElement>();
@@ -50,12 +50,12 @@ const SignInForm: React.FC<PropTypes> = ({logIn, setAuthorization}) => {
   };
 
   const handleSignUp = () => {
-    setAuthorization({authorize: 'signUp'});
+    setAuthorization({ authorize: 'signUp' });
   };
 
   return (
     <>
-    <div className={classes.formHeader}>Sign In</div>
+      <div className={classes.formHeader}>Sign In</div>
       <form className={classes.root} noValidate autoComplete="off">
         <TextField
           inputRef={nameRef}
@@ -72,7 +72,7 @@ const SignInForm: React.FC<PropTypes> = ({logIn, setAuthorization}) => {
         <Button variant="contained" onClick={onClick}>submit</Button>
       </form>
       <div className={classes.formTransfer}>
-        <div>Don't have an account?</div>
+        <div>Don`t have an account?</div>
         <div onClick={handleSignUp} className={classes.transferButton}>Sign Up</div>
       </div>
     </>
-- 
cgit v1.2.3


From 171af45318b3c27c232fc7d1aee99976dfb3046e Mon Sep 17 00:00:00 2001
From: ilyayudovin <ilyayudovin123@gmail.com>
Date: Tue, 16 Jun 2020 18:52:58 +0300
Subject: replace interface with simple string for authorization

---
 src/pages/AuthPage/SignInForm.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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

diff --git a/src/pages/AuthPage/SignInForm.tsx b/src/pages/AuthPage/SignInForm.tsx
index cf68493..ae75541 100644
--- a/src/pages/AuthPage/SignInForm.tsx
+++ b/src/pages/AuthPage/SignInForm.tsx
@@ -5,7 +5,7 @@ import Button from '@material-ui/core/Button';
 
 interface PropTypes {
   logIn: (name: string, password: string) => Promise<boolean>;
-  setAuthorization: (authorization: { authorize: string }) => void;
+  setAuth: (auth: string) => void;
 }
 
 const useStyles = makeStyles(theme => ({
@@ -33,7 +33,7 @@ const useStyles = makeStyles(theme => ({
   }
 }));
 
-const SignInForm: React.FC<PropTypes> = ({ logIn, setAuthorization }) => {
+const SignInForm: React.FC<PropTypes> = ({ logIn, setAuth }) => {
   const [error, setError] = useState<boolean>(false);
   const classes = useStyles();
   const nameRef = useRef<HTMLInputElement>();
@@ -50,7 +50,7 @@ const SignInForm: React.FC<PropTypes> = ({ logIn, setAuthorization }) => {
   };
 
   const handleSignUp = () => {
-    setAuthorization({ authorize: 'signUp' });
+    setAuth('signUp');
   };
 
   return (
-- 
cgit v1.2.3


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

