diff --git a/src/pages/BandiPreInstructor/components/AllBandiPreInstructorTableAsync/index.js b/src/pages/BandiPreInstructor/components/AllBandiPreInstructorTableAsync/index.js
index 1ca8a0d..2356004 100644
--- a/src/pages/BandiPreInstructor/components/AllBandiPreInstructorTableAsync/index.js
+++ b/src/pages/BandiPreInstructor/components/AllBandiPreInstructorTableAsync/index.js
@@ -45,10 +45,11 @@ const AllBandiPreInstructorTableAsync = () => {
}
});
const statuses = ['DRAFT', 'PUBLISH', 'EXPIRED'];
+ const initialFetchStatuses = ['PUBLISH', 'EXPIRED'];
const role = storeGet('getRole')
- const getPaginationQuery = useCallback(() => getQueryParamsForPaginatedEndpoint(lazyState, statuses, 'id'), [lazyState]);
+ const getPaginationQuery = useCallback(() => getQueryParamsForPaginatedEndpoint(lazyState, initialFetchStatuses, 'id'), [lazyState]);
const onPage = (event) => {
setLazyState(event);
@@ -174,7 +175,7 @@ const AllBandiPreInstructorTableAsync = () => {
const paginationQuery = getPaginationQuery();
BandoService.getBandiPaginated(paginationQuery, getCallback, errGetCallbacks);
- }, [lazyState]);
+ }, [lazyState, getPaginationQuery]);
return (
diff --git a/src/pages/Dashboard/components/LatestBandiTableAsync/index.js b/src/pages/Dashboard/components/LatestBandiTableAsync/index.js
index b5b29de..548ad9a 100644
--- a/src/pages/Dashboard/components/LatestBandiTableAsync/index.js
+++ b/src/pages/Dashboard/components/LatestBandiTableAsync/index.js
@@ -40,10 +40,10 @@ const LatestBandiTableAsync = () => {
name: { value: null, matchMode: 'contains' },
startDate: { value: null, matchMode: 'dateIs' },
endDate: { value: null, matchMode: 'dateIs' },
- status: { value: null, matchMode: 'equals' }
+ status: { value: 'PUBLISH', matchMode: 'equals' }
}
});
- const statuses = ['PUBLISH', 'EXPIRED'];
+ const statuses = ['PUBLISH'];
const getPaginationQuery = useCallback(() => getQueryParamsForPaginatedEndpoint(lazyState, statuses, 'id'), [lazyState]);
@@ -197,7 +197,7 @@ const LatestBandiTableAsync = () => {
const paginationQuery = getPaginationQuery();
BandoService.getBandiPaginated(paginationQuery, getCallback, errGetCallbacks);
- }, [lazyState]);
+ }, [lazyState, getPaginationQuery]);
return (
diff --git a/src/pages/DashboardInstructorManager/components/LatestBandiTableInstructorManagerAsync/index.js b/src/pages/DashboardInstructorManager/components/LatestBandiTableInstructorManagerAsync/index.js
index 1896e10..1bd8030 100644
--- a/src/pages/DashboardInstructorManager/components/LatestBandiTableInstructorManagerAsync/index.js
+++ b/src/pages/DashboardInstructorManager/components/LatestBandiTableInstructorManagerAsync/index.js
@@ -44,11 +44,6 @@ const LatestBandiTableInstructorManagerAsync = () => {
});
const statuses = ['PUBLISH'];
- // const displayedItems = useMemo(()=>{
- // if(!items) return null;
- // return items.filter(item => item.status === 'PUBLISH');
- // },[items])
-
const getPaginationQuery = useCallback(() => getQueryParamsForPaginatedEndpoint(lazyState, statuses, 'id'), [lazyState]);
const onPage = (event) => {