Skip to content

Commit f8b54ef

Browse files
committed
minor fix on expiration time of token on fe. also forgot the note, after letting lombok add its annotations coverage went to 84,8.
1 parent c11920a commit f8b54ef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

BankApplicationFrontend/src/components/NavigationBar/NavigationBar.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Link, Redirect } from 'react-router-dom'
33
import { connect } from 'react-redux'
44
import { Navbar, Nav, NavItem } from 'react-bootstrap'
55
import { showDialog, logout } from '../../actions'
6-
import { LSKEY_USERNAME, LSKEY_TOKEN } from '../../config/constants'
6+
import { LSKEY_USERNAME, LSKEY_TOKEN, LSKEY_TOKEN_EXPIRATIONTIME } from '../../config/constants'
77

88
const mapStateToProps = state => ({
99
loggedInUsername: state.login != null ? state.login.username : null
@@ -36,6 +36,7 @@ class NavBarTop extends React.Component {
3636
onLoggedOut() {
3737
localStorage.removeItem(LSKEY_USERNAME);
3838
localStorage.removeItem(LSKEY_TOKEN);
39+
localStorage.removeItem(LSKEY_TOKEN_EXPIRATIONTIME);
3940
this.props.logout();
4041
this.setState({ hasJustLoggedOut: true });
4142
}

0 commit comments

Comments
 (0)