loadprofile loop bug fixed
This commit is contained in:
@@ -46,13 +46,10 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||
setIsLogin({loading: false, status: false})
|
||||
})
|
||||
}
|
||||
const getProfile = useCallback(()=>{
|
||||
loadProfile() // API CALL TO GET USER PROFILE
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
if(!isLogin.status){
|
||||
getProfile()
|
||||
loadProfile() // LOADS USER PROFILE DETAILS AND CALLS DISPATCH UPDATEUSERDETAILS TO UPDATE USERDETAILS SLICE IN STORE
|
||||
}
|
||||
|
||||
const checkInactivity = setInterval(() => {
|
||||
|
||||
Reference in New Issue
Block a user