Skip to content

Commit

Permalink
Hiding logout button when not logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
Dexagod committed Sep 30, 2020
1 parent df07386 commit 46c1827
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function App () {
<MiniDrawer defaultview='help'></MiniDrawer>
</LoggedIn>
<LoggedOut>
<MiniDrawer defaultview='help' sideBarItems={['login', 'help']} topBarItems={['help']}></MiniDrawer>
<MiniDrawer defaultview='help' sideBarItems={['login', 'help']} topBarItems={['help']} hidelogout={true}></MiniDrawer>
</LoggedOut>
</div>
)
Expand Down
12 changes: 8 additions & 4 deletions src/Components/MiniDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ import MenuItem from '@material-ui/core/MenuItem';
import Badge from '@material-ui/core/Badge';
import { LogoutButton } from '@solid/react';

import '../css/Drawer.css'


import solidlogo from '../assets/solid-emblem.svg';
import idlablogo from '../assets/idlab.png';

Expand Down Expand Up @@ -192,10 +195,11 @@ const MiniDrawer = withWebId((props) => {
</Navbar.Brand>

{topbarComponents}

<MenuItem className='topmenuitem'>
<LogoutButton className="logoutButton"/>
</MenuItem>
{props.hidelogout
? <div />
: <MenuItem className='topmenuitem'>
<LogoutButton className="logoutButton"/>
</MenuItem>}

</Toolbar>
</AppBar>
Expand Down

0 comments on commit 46c1827

Please sign in to comment.