From 171af45318b3c27c232fc7d1aee99976dfb3046e Mon Sep 17 00:00:00 2001 From: ilyayudovin 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; - 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 = ({ logIn, setAuthorization }) => { +const SignInForm: React.FC = ({ logIn, setAuth }) => { const [error, setError] = useState(false); const classes = useStyles(); const nameRef = useRef(); @@ -50,7 +50,7 @@ const SignInForm: React.FC = ({ logIn, setAuthorization }) => { }; const handleSignUp = () => { - setAuthorization({ authorize: 'signUp' }); + setAuth('signUp'); }; return ( -- cgit v1.2.3