initialize and pass api client to subviews

This commit is contained in:
Jake McDermott
2019-01-02 02:11:01 -05:00
parent a023df2c17
commit 8f4437e17e
7 changed files with 99 additions and 48 deletions

View File

@@ -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 }));
};