});
const mapDispatchToProps = (dispatch: Dispatch): AutoLogoutActionProps => ({
- doLogout: () => dispatch<any>(logout(true)),
+ doLogout: () => dispatch<any>(logout(true, true)),
doWarn: (message: string, duration: number) =>
dispatch(snackbarActions.OPEN_SNACKBAR({
message, hideDuration: duration, kind: SnackbarKind.WARNING })),
return () => {
window.removeEventListener('storage', handleStorageEvents);
};
- }, []);
+ });
const handleStorageEvents = (e: StorageEvent) => {
if (e.key === LAST_ACTIVE_TIMESTAMP) {
const handleOnAction = () => {
// Notify the other tabs there was some activity.
- const now = (new Date).getTime();
+ const now = (new Date()).getTime();
localStorage.setItem(LAST_ACTIVE_TIMESTAMP, now.toString());
};