Adding logout option.

feature/appm-store/pbac
sinthuja 7 years ago
parent 362a2d1d32
commit 596b25a5ab

@ -63,7 +63,7 @@ class Base extends Component {
}
render() {
console.log('came here/////');
console.log('came to base ../////');
if (this.state.user !== null) {
return (
<div>
@ -107,12 +107,13 @@ class Store extends Component {
}
render() {
console.log('came to store');
return (
<div className="App">
<Router basename="store" history={history}>
<Switch>
<Route path="/login" component={Login}/>
<Route path="/logout" component={Login}/>
<Route exact path="/login" component={Login}/>
<Route exact path="/logout" component={Login}/>
<Route component={Base}/>
</Switch>
</Router>

@ -43,7 +43,7 @@ class UserOptions extends Component {
if (this.state.user) {
return (
<div id='user-options-drop-down' className="dropdown-content" style={{display: displayOptions}}>
<a href="#">Logout</a>
<a href="/store/logout">Logout</a>
</div>
);
} else {

Loading…
Cancel
Save