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/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<PropTypes> = ({ logIn }) => {
-  const [authorization, setAuthorization] = useState<Authorization>({ authorize: 'signIn' });
+  const [auth, setAuth] = useState<String>('signIn');
 
   return (
     <>
-      {authorization.authorize === 'signIn' && <SignInForm logIn={logIn} setAuthorization={setAuthorization} />}
-      {authorization.authorize === 'signUp' && <SignUpForm logIn={logIn} setAuthorization={setAuthorization} />}
+      {auth === 'signIn' && <SignInForm logIn={logIn} setAuth={setAuth} />}
+      {auth === 'signUp' && <SignUpForm logIn={logIn} setAuth={setAuth} />}
     </>
   );
 };
-- 
cgit v1.2.3

