Commit 32ac1ea7 by jaymehta

.

1 parent 2926a56c
......@@ -21,8 +21,8 @@ const Detail = () => {
const { faqs } = useSelector(state => state.faqs);
useEffect(() => {
// console.log("router", activityById.data.attributes.category?.data?.attributes.name);
dispatch(getActivitiesByFilters({ category: activityById?.data.attributes.category?.data?.id, currentPage: router.query.page }));
}, [activityById, router]);
dispatch(getActivitiesByFilters({ category: activityById?.data.attributes.category?.data?.id }));
}, [activityById]);
// console.log("faqs=>", faqs);
console.log("activityById", activityById);
......
import { Empty } from "antd";
import Image from "next/image";
import { useRouter } from "next/router";
import React, { useState } from "react";
import React, { useEffect, useState } from "react";
import { Button } from "react-bootstrap";
import { Loader } from "react-bootstrap-typeahead";
import { useSelector } from "react-redux";
import { useDispatch, useSelector } from "react-redux";
import { cleanImage } from "../../services/imageHandling";
import WishlistComponent from "../detail/WIshlistComponent";
import Pagination from "react-js-pagination";
import { getActivitiesByFilters } from "../../redux/actions/activityAction";
const ListingItems = ({ allActivitiesData, loading, gridClass, totalCount }) => {
// const [gridClass, setGridClass] = useState('col-md-3');
const { endUser } = useSelector(state => state.endUser);
console.log("endUser", endUser);
const router = useRouter();
const dispatch = useDispatch();
useEffect(() => {
dispatch(getActivitiesByFilters({ currentPage: router.query.page }));
}, [router]);
console.log("endUser", endUser);
// console.log("router", router);
let { page = 1, location = "" } = router.query;
page = Number(page);
......@@ -39,6 +44,7 @@ const ListingItems = ({ allActivitiesData, loading, gridClass, totalCount }) =>
});
};
console.log("page", page);
return (
<>
{allActivitiesData && !allActivitiesData.data.length == 0 ? (
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!