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