Commit 2926a56c by jaymehta

.

1 parent d4e8a550
...@@ -22,9 +22,9 @@ const Detail = () => { ...@@ -22,9 +22,9 @@ const Detail = () => {
useEffect(() => { useEffect(() => {
// console.log("router", activityById.data.attributes.category?.data?.attributes.name); // console.log("router", activityById.data.attributes.category?.data?.attributes.name);
dispatch(getActivitiesByFilters({ category: activityById?.data.attributes.category?.data?.id, currentPage: router.query.page })); dispatch(getActivitiesByFilters({ category: activityById?.data.attributes.category?.data?.id, currentPage: router.query.page }));
}, [activityById]); }, [activityById, router]);
console.log("faqs=>", faqs); // console.log("faqs=>", faqs);
console.log("activityById", activityById); console.log("activityById", activityById);
console.log("loadedUser", loadedUser); console.log("loadedUser", loadedUser);
return ( return (
......
...@@ -111,7 +111,7 @@ const ListingInner = ({ allActivitiesData, loading, totalCount }) => { ...@@ -111,7 +111,7 @@ const ListingInner = ({ allActivitiesData, loading, totalCount }) => {
currentPage: router.query.page currentPage: router.query.page
}) })
); );
}, [activityFilters]); }, [activityFilters, router]);
return ( return (
<> <>
......
...@@ -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 }));
}, [router]); // }, [router]);
return ( return (
<Layout> <Layout>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!