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/AuthPage.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/pages/AuthPage/AuthPage.tsx') diff --git a/src/pages/AuthPage/AuthPage.tsx b/src/pages/AuthPage/AuthPage.tsx index fc7f404..0072686 100644 --- a/src/pages/AuthPage/AuthPage.tsx +++ b/src/pages/AuthPage/AuthPage.tsx @@ -1,7 +1,6 @@ import React, { useState } from 'react'; import SignInForm from './SignInForm'; import SignUpForm from './SignUpForm'; -import { Authorization } from '../../types'; interface PropTypes { @@ -9,12 +8,12 @@ interface PropTypes { } const AuthPage: React.FC = ({ logIn }) => { - const [authorization, setAuthorization] = useState({ authorize: 'signIn' }); + const [auth, setAuth] = useState('signIn'); return ( <> - {authorization.authorize === 'signIn' && } - {authorization.authorize === 'signUp' && } + {auth === 'signIn' && } + {auth === 'signUp' && } ); }; -- cgit v1.2.3