clean up on unused APIs

This commit was merged in pull request #794.
This commit is contained in:
victorAnumudu
2024-09-25 20:40:37 +01:00
parent 2ca1c668f5
commit 99d9a468f6
5 changed files with 101 additions and 86 deletions
+22 -20
View File
@@ -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