update app component to utilize collapsing header and update style overrides

This commit is contained in:
John Mitchell
2018-11-09 17:30:48 -05:00
parent ea0f3a64b1
commit 4632383a33
2 changed files with 25 additions and 48 deletions

View File

@@ -14,7 +14,10 @@ import {
NavItem,
Page,
PageHeader,
PageSidebar
PageSidebar,
Toolbar,
ToolbarGroup,
ToolbarItem
} from '@patternfly/react-core';
import { global_breakpoint_md as breakpointMd } from '@patternfly/react-tokens';
@@ -87,6 +90,16 @@ class App extends React.Component {
const { activeItem, activeGroup, isNavOpen } = this.state;
const { logo, loginInfo } = this.props;
const PageToolbar = (
<Toolbar>
<ToolbarGroup>
<ToolbarItem>
<LogoutButton onDevLogout={() => this.onDevLogout()} />
</ToolbarItem>
</ToolbarGroup>
</Toolbar>
);
return (
<Router>
<Fragment>
@@ -110,7 +123,7 @@ class App extends React.Component {
header={(
<PageHeader
logo={<TowerLogo onClick={this.onLogoClick} />}
avatar={<LogoutButton onDevLogout={() => this.onDevLogout()} />}
toolbar={PageToolbar}
showNavToggle
onNavToggle={this.onNavToggle}
/>
@@ -329,6 +342,7 @@ class App extends React.Component {
)}
/>
)}
useCondensed
>
<ConditionalRedirect shouldRedirect={() => !api.isAuthenticated()} redirectPath="/login" exact path="/" component={() => (<Redirect to="/home" />)} />
<ConditionalRedirect shouldRedirect={() => !api.isAuthenticated()} redirectPath="/login" path="/home" component={Dashboard} />