Commit efc94f23 by jaymehta

paginationissue

1 parent f7244728
...@@ -11,9 +11,9 @@ export default function ListingPage() { ...@@ -11,9 +11,9 @@ export default function ListingPage() {
/** Client side rendering, traditional API call. */ /** Client side rendering, traditional API call. */
const router = useRouter(); const router = useRouter();
const dispatch = useDispatch(); const dispatch = useDispatch();
useEffect(() => { // useEffect(() => {
dispatch(getActivitiesByFilters({ currentPage: router.query.page })); // dispatch(getActivitiesByFilters({ currentPage: router.query.page }));
}, []); // }, []);
return ( return (
<Layout> <Layout>
...@@ -25,7 +25,7 @@ export default function ListingPage() { ...@@ -25,7 +25,7 @@ export default function ListingPage() {
/** For server side rendering */ /** For server side rendering */
export const getServerSideProps = wrapper.getServerSideProps(store => async ({ req, query }) => { export const getServerSideProps = wrapper.getServerSideProps(store => async ({ req, query }) => {
try { try {
// await store.dispatch(getActivitiesByFilters({ currentPage: query.page })); await store.dispatch(getActivitiesByFilters({ currentPage: query.page }));
await store.dispatch(getAllCategories()); await store.dispatch(getAllCategories());
await store.dispatch(getSubCategoriesByCategoryId()); await store.dispatch(getSubCategoriesByCategoryId());
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!