mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-07 16:41:48 -05:00
initialize and pass api client to subviews
This commit is contained in:
@@ -38,8 +38,17 @@ class App extends Component {
|
||||
config: {},
|
||||
error: false,
|
||||
};
|
||||
|
||||
this.onLogout = this.onLogout.bind(this);
|
||||
};
|
||||
|
||||
async onLogout () {
|
||||
const { api } = this.props;
|
||||
|
||||
await api.logout();
|
||||
window.location.replace('/#/login')
|
||||
}
|
||||
|
||||
onNavToggle = () => {
|
||||
this.setState(({ isNavOpen }) => ({ isNavOpen: !isNavOpen }));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user