|
|
@@ -1,8 +1,8 @@ |
|
|
|
import React, { createContext, useState, useEffect } from 'react'; |
|
|
|
import {useNavigate} from "react-router-dom"; |
|
|
|
//import axios from "axios"; |
|
|
|
import {getUserData} from "../auth/utils"; |
|
|
|
import {isObjEmpty} from "../utils/Utils"; |
|
|
|
// import {getUserData} from "../auth/utils"; |
|
|
|
// import {isObjEmpty} from "../utils/Utils"; |
|
|
|
import {useIdleTimer} from "react-idle-timer"; |
|
|
|
import { handleLogoutFunction } from 'auth/index'; |
|
|
|
import { useDispatch } from "react-redux"; |
|
|
@@ -52,8 +52,8 @@ const AutoLogoutProvider = ({ children }) => { |
|
|
|
//const tabId = getTabId() === null ? 'loading' : getTabId().toString() |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
const userData = getUserData(); |
|
|
|
if(!isObjEmpty(userData)){ |
|
|
|
// const userData = getUserData(); |
|
|
|
if(isUserLoggedIn()){ |
|
|
|
//TODO: get auto logout time here |
|
|
|
if(isGLDLoggedIn()){ |
|
|
|
setLogoutInterval(240); |
|
|
|