home recent
This commit is contained in:
@@ -7,6 +7,7 @@ import { updateUserDetails } from "../store/UserDetails";
|
||||
import { updateJobs } from "../store/jobLists";
|
||||
import { updateUserJobList } from "../store/userJobList";
|
||||
import { commonHeadBanner } from "../store/CommonHeadBanner";
|
||||
import { recentActivitiesData } from "../store/RecentActivitiesData";
|
||||
|
||||
const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||
const apiCall = useMemo(() => new usersService(), []);
|
||||
@@ -137,6 +138,20 @@ const AuthRoute = ({ redirectPath = "/login", children }) => {
|
||||
console.log('ERROR ', error)
|
||||
});
|
||||
},[])
|
||||
//
|
||||
//FUNCTION TO GET COMMON HEAD DATA
|
||||
useEffect(()=>{
|
||||
apiCall.getRecentActivitiedData().then((res) => {
|
||||
// debugger;
|
||||
if (res.data?.internal_return < 0) {
|
||||
return;
|
||||
}
|
||||
dispatch(recentActivitiesData(res.data));
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log('ERROR ', error)
|
||||
});
|
||||
},[])
|
||||
|
||||
return isLogin.loading && !loggedIn ? (
|
||||
<LoadingSpinner size="32" color="sky-blue" height="h-screen" />
|
||||
|
||||
@@ -147,6 +147,16 @@ class usersService {
|
||||
return this.postAuxEnd("/homebanners", postData);
|
||||
}
|
||||
|
||||
getRecentActivitiedData() {
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uid"),
|
||||
member_id: localStorage.getItem("member_id"),
|
||||
sessionid: localStorage.getItem("session_token"),
|
||||
page: 0,
|
||||
limit: 100,
|
||||
};
|
||||
return this.postAuxEnd("/dashrecent", postData);
|
||||
}
|
||||
getGetPendingJobs() {
|
||||
var postData = {
|
||||
uuid: localStorage.getItem("uid"),
|
||||
|
||||
Reference in New Issue
Block a user