clean up on unused APIs
This commit was merged in pull request #794.
This commit is contained in:
@@ -111,8 +111,8 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const getNotifications = () => {
|
||||
useEffect(() => { // FUNCTION TO GET NOTIFICATIONS LIST
|
||||
const notifications = () => {
|
||||
// function to load user notification
|
||||
dispatch(updateNotifications({ loading: true }));
|
||||
apiCall
|
||||
@@ -168,7 +168,9 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||
dispatch(updateNotifications({ loading: false, data: null }));
|
||||
});
|
||||
};
|
||||
getNotifications();
|
||||
// delay verify requests by 10000ms
|
||||
const delay15secs = setTimeout(notifications, 15000)
|
||||
return ()=> clearTimeout(delay15secs)
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -248,23 +250,23 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||
}, [isLogin.status]);
|
||||
|
||||
//FUNCTION TO GET COMMON HEAD DATA
|
||||
useEffect(() => {
|
||||
if((!loggedIn && !isLogin.status) || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
|
||||
return
|
||||
}
|
||||
apiCall
|
||||
.getRecentActivitiedData()
|
||||
.then((res) => {
|
||||
// debugger;
|
||||
if (res?.data?.internal_return < 0) {
|
||||
return;
|
||||
}
|
||||
dispatch(recentActivitiesData(res.data));
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("ERROR ", error);
|
||||
});
|
||||
}, [isLogin.status]);
|
||||
// useEffect(() => {
|
||||
// if((!loggedIn && !isLogin.status) || account_type == 'FAMILY'){ // DO NOT CALL THIS, IF USER ACCOUNT TYPE IS FAMILY
|
||||
// return
|
||||
// }
|
||||
// apiCall
|
||||
// .getRecentActivitiedData()
|
||||
// .then((res) => {
|
||||
// // debugger;
|
||||
// if (res?.data?.internal_return < 0) {
|
||||
// return;
|
||||
// }
|
||||
// dispatch(recentActivitiesData(res.data));
|
||||
// })
|
||||
// .catch((error) => {
|
||||
// console.log("ERROR ", error);
|
||||
// });
|
||||
// }, [isLogin.status]);
|
||||
|
||||
|
||||
//FUNCTION TO GET FAMILY BANNERS
|
||||
|
||||
Reference in New Issue
Block a user