Skip to content
Snippets Groups Projects
Commit b8abb507 authored by Martin Lowe's avatar Martin Lowe :flag_ca:
Browse files

Merge branch 'zhoufang/dev/errorPageIssue' into 'master'

Fixed not showing error page properly issue

See merge request !462
parents e5d14417 7df9903d
No related branches found
No related tags found
2 merge requests!466Merge master into dev,!462Fixed not showing error page properly issue
Pipeline #1729 pending with stage
......@@ -65,7 +65,8 @@ export default function MainPortal({
const classes = useStyles();
const [mobileOpen, setMobileOpen] = useState(false);
const { gotCSRF, currentUser } = useContext(GlobalContext);
const loggedIn = currentUser !== null;
// The loggedIn will only be true when the user is logged in and he/she is at least linked to 1 org
const loggedIn = currentUser !== null && currentUser.relation.length > 0;
const handleDrawerToggle = () => {
setMobileOpen(!mobileOpen);
};
......@@ -82,7 +83,7 @@ export default function MainPortal({
return (
<>
{currentUser && (
{loggedIn && (
<>
<AppTopBar handleDrawerToggle={handleDrawerToggle} />
<LeftNavBar mobileOpen={mobileOpen} handleDrawerToggle={handleDrawerToggle} />
......@@ -113,7 +114,7 @@ export default function MainPortal({
<Redirect to="/portal/dashboard" />
</Route>
</Switch>
<div className={classes.loginFooter}>
<div className={loggedIn ? '' : classes.loginFooter}>
<PortalFooter />
</div>
</>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment