diff --git a/src/frontend/src/api/HomeService.ts b/src/frontend/src/api/HomeService.ts index bda9eccd0a..de3ece8b3d 100755 --- a/src/frontend/src/api/HomeService.ts +++ b/src/frontend/src/api/HomeService.ts @@ -10,7 +10,9 @@ export const HomeSummaryService: Function = (url: string) => { const fetchHomeSummaries = async (url) => { try { const fetchHomeData = await axios.get(url); - const resp: any = fetchHomeData.data; + const resp: any = fetchHomeData.data.results; + const paginationResp = fetchHomeData.data.pagination; + dispatch(HomeActions.SetHomeProjectPagination(paginationResp)); const fetchProjectCentroid = await axios.get(`${import.meta.env.VITE_API_URL}/projects/centroid/`); const projectCentroidResp: any = fetchProjectCentroid.data; const addedProjectCentroidOnSummary = resp.map((project) => { diff --git a/src/frontend/src/components/home/HomePageFilters.tsx b/src/frontend/src/components/home/HomePageFilters.tsx index 2918b9db6c..85fa0fa40b 100755 --- a/src/frontend/src/components/home/HomePageFilters.tsx +++ b/src/frontend/src/components/home/HomePageFilters.tsx @@ -12,6 +12,7 @@ const HomePageFilters = ({ onSearch, filteredProjectCount, totalProjectCount }) const defaultTheme: any = CoreModules.useAppSelector((state) => state.theme.hotTheme); const showMapStatus: boolean = CoreModules.useAppSelector((state) => state.home.showMapStatus); + const homeProjectPagination = CoreModules.useAppSelector((state) => state.home.homeProjectPagination); const { windowSize } = windowDimention(); const searchableInnerStyle: any = { @@ -141,7 +142,7 @@ const HomePageFilters = ({ onSearch, filteredProjectCount, totalProjectCount })
- Showing {filteredProjectCount} {filteredProjectCount > 1 ? 'projects' : 'project'} + Showing {filteredProjectCount} of {homeProjectPagination.total} projects
{/*