This commit is contained in:
victorAnumudu
2024-12-12 11:40:39 +01:00
parent ff7e1d9b3e
commit c81b1061d3
2 changed files with 3 additions and 5 deletions
+1 -5
View File
@@ -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)
})
},[])
+2
View File
@@ -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