home banner reload mechanism added
This commit was merged in pull request #856.
This commit is contained in:
@@ -116,16 +116,17 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||
if((!loggedIn && !isLogin.status) || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
|
||||
return
|
||||
}
|
||||
dispatch(commonHeadBanner({loading:true, data:{}}));
|
||||
apiCall
|
||||
.getHeroJBanners()
|
||||
.then((res) => {
|
||||
if (res?.data?.internal_return < 0) {
|
||||
return;
|
||||
}
|
||||
dispatch(commonHeadBanner(res.data));
|
||||
dispatch(commonHeadBanner({loading:false, data:res.data}));
|
||||
})
|
||||
.catch((error) => {
|
||||
// console.log("ERROR ", error);
|
||||
dispatch(commonHeadBanner({loading:false, data:{}}));
|
||||
});
|
||||
}, [isLogin.status, homeBanners]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user