diff options
author | eug-vs <eug-vs@keemail.me> | 2020-06-29 23:59:15 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-06-29 23:59:15 +0300 |
commit | 1f646377c35b65b97d6eeebb1e88f6d8307e1ef0 (patch) | |
tree | 56fbda6b594350656891644734d0bf740bfcbb0d /src/pages/AuthPage/AuthPage.tsx | |
parent | b301bf24c5037403a1e5fc32fc8c10794941b528 (diff) | |
download | which-ui-1f646377c35b65b97d6eeebb1e88f6d8307e1ef0.tar.gz |
feat!: create useAuth hook
Diffstat (limited to 'src/pages/AuthPage/AuthPage.tsx')
-rw-r--r-- | src/pages/AuthPage/AuthPage.tsx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/pages/AuthPage/AuthPage.tsx b/src/pages/AuthPage/AuthPage.tsx index d2c2eec..ad93463 100644 --- a/src/pages/AuthPage/AuthPage.tsx +++ b/src/pages/AuthPage/AuthPage.tsx @@ -3,11 +3,6 @@ import { makeStyles } from '@material-ui/core/styles'; import SignInForm from './SignInForm'; import SignUpForm from './SignUpForm'; - -interface PropTypes { - logIn: (name: string, password: string, remember?: boolean) => Promise<boolean>; -} - const useStyles = makeStyles({ formTransfer: { display: 'flex', @@ -20,7 +15,7 @@ const useStyles = makeStyles({ } }); -const AuthPage: React.FC<PropTypes> = ({ logIn }) => { +const AuthPage: React.FC = () => { const [auth, setAuth] = useState<'signIn' | 'signUp'>('signIn'); const classes = useStyles(); @@ -35,8 +30,8 @@ const AuthPage: React.FC<PropTypes> = ({ logIn }) => { return ( <> - {auth === 'signIn' && <SignInForm logIn={logIn} />} - {auth === 'signUp' && <SignUpForm logIn={logIn} />} + {auth === 'signIn' && <SignInForm />} + {auth === 'signUp' && <SignUpForm />} <div className={classes.formTransfer}> <div>{footerInfo[auth][0]}</div> <span |