@@ -48,7 +48,7 @@ class WBApp extends Component { | |||||
<WBSignIn path="/sign-in" appState={ this.state } /> | <WBSignIn path="/sign-in" appState={ this.state } /> | ||||
<WBSignOut path='/sign-out' /> | |||||
<WBSignOut path='/sign-out' app={ this } /> | |||||
<WBBrowse path="/browse/:ownerUuid?/:activePage?/:objTypeTab?/:collectionPage?/:processPage?/:workflowPage?" | <WBBrowse path="/browse/:ownerUuid?/:activePage?/:objTypeTab?/:collectionPage?/:processPage?/:workflowPage?" | ||||
appState={ this.state } | appState={ this.state } | ||||
@@ -3,9 +3,12 @@ import { route } from 'preact-router'; | |||||
class WBSignOut extends Component { | class WBSignOut extends Component { | ||||
componentDidMount() { | componentDidMount() { | ||||
delete window.localStorage['arvHost']; | |||||
delete window.localStorage['arvToken']; | |||||
delete window.localStorage['currentUser']; | |||||
const { app } = this.props; | |||||
const keys = ['arvHost', 'arvToken', 'currentUser']; | |||||
for (let i = 0; i < keys.length; i++) { | |||||
delete app.state[keys[i]]; | |||||
delete window.localStorage[keys[i]]; | |||||
} | |||||
route('/sign-in'); | route('/sign-in'); | ||||
} | } | ||||