diff options
author | ilyayudovin <ilyayudovin123@gmail.com> | 2020-06-14 17:28:24 +0300 |
---|---|---|
committer | ilyayudovin <ilyayudovin123@gmail.com> | 2020-06-14 17:28:24 +0300 |
commit | 657c340ea9e244b7f1041bac5be240d428d758e5 (patch) | |
tree | 890978dd6a98b1dc4a582935d37c79528ed4c524 /src/index.tsx | |
parent | 3c3223c3b41411639ff19ebd58df569cf17999ca (diff) | |
download | which-ui-657c340ea9e244b7f1041bac5be240d428d758e5.tar.gz |
feat: add profilePage to render ProfileInfo and SignInForm
Diffstat (limited to 'src/index.tsx')
-rw-r--r-- | src/index.tsx | 19 |
1 files changed, 4 insertions, 15 deletions
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> |