diff options
author | 2019-03-25 14:27:10 +0000 | |
---|---|---|
committer | 2019-03-25 14:27:10 +0000 | |
commit | 1f68c64e8bcf88ee485c69d36c67b0ad6590a293 (patch) | |
tree | 34ab01010c3a8b3bb4086d4b683a6fd8040f2992 /sdnr/wt/odlux/framework/src/components/navigationMenu.tsx | |
parent | 528f6391de8495f3346b5e22ede404c00b9955b7 (diff) | |
parent | 2d4424c28ac35763ef44c42ae2f01664d42b268c (diff) |
Merge "Security provider for UX-Client-Login"
Diffstat (limited to 'sdnr/wt/odlux/framework/src/components/navigationMenu.tsx')
-rw-r--r-- | sdnr/wt/odlux/framework/src/components/navigationMenu.tsx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sdnr/wt/odlux/framework/src/components/navigationMenu.tsx b/sdnr/wt/odlux/framework/src/components/navigationMenu.tsx index f6df244a0..3a7725b1b 100644 --- a/sdnr/wt/odlux/framework/src/components/navigationMenu.tsx +++ b/sdnr/wt/odlux/framework/src/components/navigationMenu.tsx @@ -25,6 +25,7 @@ const styles = (theme: Theme) => createStyles({ });
export const NavigationMenu = withStyles(styles)(connect()(({ classes, state }: WithStyles<typeof styles> & Connect) => {
+ const { user } = state.framework.authenticationState
return (
<Drawer
variant="permanent"
@@ -32,10 +33,11 @@ export const NavigationMenu = withStyles(styles)(connect()(({ classes, state }: paper: classes.drawerPaper,
}}
>
- <div className={classes.toolbar} />
+ {user && user.isValid && <>
+ <div className={classes.toolbar} />
{ /* https://fiffty.github.io/react-treeview-mui/ */}
<List component="nav">
- { process.env.NODE_ENV === "development" ? <ListItemLink exact to="/" primary="Home" icon={<FontAwesomeIcon icon={faHome} />} /> : null }
+ { process.env.NODE_ENV === "development" ? <ListItemLink exact to="/" primary="Home" icon={<FontAwesomeIcon icon={faHome} />} /> : null }
<Divider />
{
state.framework.applicationRegistraion && Object.keys(state.framework.applicationRegistraion).map(key => {
@@ -51,8 +53,10 @@ export const NavigationMenu = withStyles(styles)(connect()(({ classes, state }: }) || null
}
<Divider />
- { process.env.NODE_ENV === "development" ? <ListItemLink to="/about" primary="About" icon={<FontAwesomeIcon icon={faAddressBook} />} /> : null }
- </List>
+ { process.env.NODE_ENV === "development" ? <ListItemLink to="/about" primary="About" icon={<FontAwesomeIcon icon={faAddressBook} />} /> : null }
+ </List>
+ </> || null
+ }
</Drawer>)
}));
|