19482: Tests should be passing now
[arvados.git] / src / views-components / auto-logout / auto-logout.tsx
index 9a8299b25ca3b351f6c3f9ee161f9e6b67bb5d0c..b4bef2b5efdb51b40d73542f51aad87b86969a16 100644 (file)
@@ -30,7 +30,7 @@ const mapStateToProps = (state: RootState, ownProps: any): AutoLogoutDataProps =
 });
 
 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 })),
@@ -63,7 +63,7 @@ export const AutoLogoutComponent = (props: AutoLogoutProps) => {
         return () => {
             window.removeEventListener('storage', handleStorageEvents);
         };
-    }, []);
+    });
 
     const handleStorageEvents = (e: StorageEvent) => {
         if (e.key === LAST_ACTIVE_TIMESTAMP) {
@@ -90,7 +90,7 @@ export const AutoLogoutComponent = (props: AutoLogoutProps) => {
 
     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());
     };