bug fix
This commit is contained in:
@@ -60,17 +60,13 @@ export default function UserExist() {
|
|||||||
},[lastActivityTime])
|
},[lastActivityTime])
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
let token = localStorage.getItem('token')
|
|
||||||
if(!token){
|
|
||||||
return navigate(siteLinks.login)
|
|
||||||
}
|
|
||||||
|
|
||||||
accountDashboard().then(res => {
|
accountDashboard().then(res => {
|
||||||
const {dash_data} = res?.data
|
const {dash_data} = res?.data
|
||||||
setLoading(false)
|
setLoading(false)
|
||||||
dispatch(updateUserDetails({ ...dash_data }));
|
dispatch(updateUserDetails({ ...dash_data }));
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
navigate(siteLinks.login)
|
navigate(siteLinks.login)
|
||||||
|
setLoading(false)
|
||||||
})
|
})
|
||||||
},[])
|
},[])
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ const getAuxEnd = (path) => {
|
|||||||
const basePath = process.env.REACT_APP_MAIN_API
|
const basePath = process.env.REACT_APP_MAIN_API
|
||||||
return axios.get(`${basePath}${path}`).then(res => {
|
return axios.get(`${basePath}${path}`).then(res => {
|
||||||
return res
|
return res
|
||||||
|
// localStorage.clear();
|
||||||
|
// window.location.href = `/login?sessionExpired=true`;
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
// throw new Error(err.response.data.message);
|
// throw new Error(err.response.data.message);
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user