From 657c340ea9e244b7f1041bac5be240d428d758e5 Mon Sep 17 00:00:00 2001
From: ilyayudovin <ilyayudovin123@gmail.com>
Date: Sun, 14 Jun 2020 17:28:24 +0300
Subject: feat: add profilePage to render ProfileInfo and SignInForm

---
 src/index.tsx | 19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)

(limited to 'src/index.tsx')

diff --git a/src/index.tsx b/src/index.tsx
index ec31728..a5e1168 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -11,9 +11,9 @@ import 'typeface-roboto';
 
 import Header from './Components/Header/Header';
 import Feed from './Components/Feed/Feed';
-import ProfileInfo from './Pages/ProfilePage/ProfileInfo/ProfileInfo';
-
-import SignInForm from './Pages/ProfilePage/Form/SignInForm';
+import ProfileInfo from './Pages/ProfilePage/ProfileInfo';
+import ProfilePage from './Pages/ProfilePage/ProfilePage';
+import SignInForm from './Pages/ProfilePage/SignInForm';
 import { User } from './types';
 import { get } from './requests';
 
@@ -53,18 +53,7 @@ const App: React.FC = () => {
       <Header setPage={setPage} />
       <div className={classes.root}>
         {
-          page === 'profile'
-            ? (
-              user
-                ? (
-                  <>
-                    <ProfileInfo id={user?._id || ''} setUser={setUser} />
-                    <Feed page={page} />
-                  </>
-                )
-                : <SignInForm setUser={setUser} />
-            )
-            : <Feed page={page} />
+          page === 'profile' ?  <ProfilePage id={user?._id || ''} setUser={setUser} user={user} /> : <Feed page={page} />
         }
       </div>
     </ThemeProvider>
-- 
cgit v1.2.3

