From 3969face39ecc933b1cb9c7625be921d148552cb Mon Sep 17 00:00:00 2001 From: ilyayudovin Date: Sun, 14 Jun 2020 01:31:05 +0300 Subject: feat: add sing in form --- src/index.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/index.tsx') diff --git a/src/index.tsx b/src/index.tsx index adf44a5..98be8a7 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -13,7 +13,8 @@ import Header from './Header/Header'; import Feed from './Feed/Feed'; import ProfileInfo from './ProfileInfo/ProfileInfo'; -import { get } from './requests'; +import SignInForm from './Form/SignInForm'; +import { User } from './types'; const theme = createMuiTheme({ palette: { @@ -33,20 +34,17 @@ const useStyles = makeStyles({ const App: React.FC = () => { const [page, setPage] = useState('feed'); - const [id, setId] = useState(''); + const [user, setUser] = React.useState(); const classes = useStyles(); - get('/users').then(response => { - setId(response.data[0]._id); - }); - return (
{ - page === 'profile' && + // eslint-disable-next-line + page === 'profile' && (!user ? : ) }
-- cgit v1.2.3