|
|
@@ -9,12 +9,14 @@ class WBApp extends Component { |
|
|
|
super(...args);
|
|
|
|
this.state.arvHost = window.localStorage['arvHost'];
|
|
|
|
this.state.arvToken = window.localStorage['arvToken'];
|
|
|
|
this.state.currentUser = JSON.parse(window.localStorage['currentUser']);
|
|
|
|
this.appCallbacks = {
|
|
|
|
'navbarItemClicked': this.navbarItemClicked
|
|
|
|
'navbarItemClicked': item => this.navbarItemClicked(item)
|
|
|
|
};
|
|
|
|
this.appState = {
|
|
|
|
'arvHost': this.state.arvHost,
|
|
|
|
'arvToken': this.state.arvToken
|
|
|
|
'arvToken': this.state.arvToken,
|
|
|
|
'currentUser': this.state.currentUser
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
@@ -24,6 +26,13 @@ class WBApp extends Component { |
|
|
|
delete window.localStorage['arvToken'];
|
|
|
|
delete window.localStorage['currentUser'];
|
|
|
|
route('/sign-in');
|
|
|
|
|
|
|
|
} else if (item['id'] === 'home') {
|
|
|
|
route('/browse/' + this.appState.currentUser.uuid);
|
|
|
|
|
|
|
|
} else if (item['id'] === 'all-projects') {
|
|
|
|
route('/browse');
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
@@ -32,7 +41,7 @@ class WBApp extends Component { |
|
|
|
<Router>
|
|
|
|
<WBLandingPage path="/" />
|
|
|
|
|
|
|
|
<WBSignIn path="/sign-in" />
|
|
|
|
<WBSignIn path="/sign-in" appState={ this.appState } />
|
|
|
|
|
|
|
|
<WBBrowse path="/browse/:ownerUuid?/:activePage?"
|
|
|
|
appCallbacks={ this.appCallbacks }
|
|
|
|