aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/index.tsx15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/index.tsx b/src/index.tsx
index 98be8a7..1362544 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -43,10 +43,19 @@ const App: React.FC = () => {
<Header setPage={setPage} />
<div className={classes.root}>
{
- // eslint-disable-next-line
- page === 'profile' && (!user ? <SignInForm setUser={setUser} /> : <ProfileInfo id={user?._id || ''} setUser={setUser} />)
+ page === 'profile'
+ ? (
+ user
+ ? (
+ <>
+ <ProfileInfo id={user?._id || ''} setUser={setUser} />
+ <Feed page={page} />
+ </>
+ )
+ : <SignInForm setUser={setUser} />
+ )
+ : <Feed page={page} />
}
- <Feed page={page} />
</div>
</ThemeProvider>
);