diff options
author | eug-vs <eug-vs@keemail.me> | 2020-06-14 03:05:04 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-06-14 03:05:04 +0300 |
commit | 4a8924b3d214b8f5b78f8e31f2a16a0d2d461b1a (patch) | |
tree | f08e813f6fdf774deb5144f8feec40e05a95d438 /src | |
parent | f338f879a08945056dc6d35d3bb333e7d6cb0840 (diff) | |
download | which-ui-4a8924b3d214b8f5b78f8e31f2a16a0d2d461b1a.tar.gz |
feat: do not render feed under login form
Diffstat (limited to 'src')
-rw-r--r-- | src/index.tsx | 15 |
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> ); |