Commit 32aca5f0 by jaymehta

.

1 parent 2ff6c536
......@@ -111,7 +111,7 @@ const DetailInfo = ({ activityById }) => {
<div className="location">
Location & Address
</div>
<div className="mb-2">Chelsea </div>
{/* <div className="mb-2">Chelsea </div> */}
<div className="">{activityById.data.attributes.address}</div>
<div className="btn-row">
<Button
......
......@@ -34,7 +34,14 @@ const BrowseExperiences = ({ allActivitiesData }) => {
</div>
</motion.div>
<div className="view-all-btn">
<Button variant="primary">View All</Button>
<Button
variant="primary"
onClick={() => {
router.push("/listing");
}}
>
View All
</Button>
</div>
</div>
</div>
......
......@@ -3,7 +3,9 @@ import React from "react";
import { Button } from "react-bootstrap";
import { motion } from "framer-motion";
import { fadeIn, zoomIn, slideFromLeft, slideFromRight } from "../animationvariants.js";
import { useRouter } from "next/router.js";
const GiftAnExperience = () => {
const router = useRouter();
return (
<>
<section className="gift-an-experience-session">
......@@ -18,7 +20,9 @@ const GiftAnExperience = () => {
<div className="title">Gift An Experience For Any Occasion</div>
<div className="disc">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.</div>
<div>
<Button variant="primary">Gift An Experience</Button>
<Button variant="primary" onClick={()=> {
router.push("/gift-card")
}}>Gift An Experience</Button>
</div>
</div>
</motion.div>
......
......@@ -12,7 +12,9 @@ import "swiper/css";
import "swiper/css/pagination";
import "swiper/css/navigation";
import { cleanImage } from "../../services/imageHandling.js";
import { useRouter } from "next/router.js";
const LetDiscover = ({ categories }) => {
const router = useRouter();
return (
<>
<section className="let-discover-session">
......@@ -30,7 +32,14 @@ const LetDiscover = ({ categories }) => {
</div>
</motion.div>
<div className="view-all-btn">
<Button href="/listing" variant="primary">View All</Button>
<Button
onClick={() => {
router.push("/listing");
}}
variant="primary"
>
View All
</Button>
</div>
</div>
</div>
......@@ -66,7 +75,7 @@ const LetDiscover = ({ categories }) => {
}}
className="mySwiper01 mySwiper02"
>
<SwiperSlide>
{/* <SwiperSlide>
<motion.div variants={zoomIn("left", 0.3)} initial={"hidden"} whileInView={"show"} viewport={{ once: false, amount: 0.2 }}>
<a href="">
<span className="image-container">
......@@ -75,13 +84,17 @@ const LetDiscover = ({ categories }) => {
<div className="title">ALL</div>
</a>
</motion.div>
</SwiperSlide>
</SwiperSlide> */}
{categories?.data &&
categories.data.map((data, index) => {
return (
<SwiperSlide key={data?.id}>
<motion.div variants={zoomIn("left", 0.3)} initial={"hidden"} whileInView={"show"} viewport={{ once: false, amount: 0.2 }}>
<a href="" >
<a
onClick={() => {
router.push(`/listing?category=${data.id}`);
}}
>
<span className="image-container">
<Image layout="fill" alt="" className="image img-fluid" src={cleanImage(data?.attributes?.image?.data?.attributes)} />
</span>
......
......@@ -25,6 +25,9 @@ const SearchBar = () => {
open={open}
id="select"
placeholder="Search for products, brands or categories"
onBlur={()=> {
setopen(false)
}}
onChange={selected => {
console.log("selected", selected);
// router.push("/listing");
......
......@@ -67,6 +67,9 @@ const Header = () => {
<div className="header-search">
<Typeahead
open={open}
onBlur={() => {
setopen(false);
}}
id="select"
placeholder="Search for products, brands or categories"
onChange={selected => {
......
......@@ -42,7 +42,14 @@ const LetDiscover = ({ categories }) => {
// useEffect(() => {
// dispatch(getSubCategoriesByCategoryId(router.query.category));
// }, [router]);
useEffect(() => {
console.log("router.query.category", router.query.category);
if (router.query.category) {
dispatch(setActivityFilters({ filters: { category: router.query.category, subCategories: [] } }));
setActiveIndex(router.query.category);
dispatch(getSubCategoriesByCategoryId(router.query.category));
}
}, []);
const [showCloseIcon, setShowCloseIcon] = useState({});
const handleToggleCloseIcon = index => {
setShowCloseIcon(prevShowCloseIcon => ({
......@@ -102,7 +109,7 @@ const LetDiscover = ({ categories }) => {
<SwiperSlide>
<motion.div variants={zoomIn("left", 0.3)} initial={"hidden"} whileInView={"show"} viewport={{ once: false, amount: 0.2 }}>
<a
className={activeIndex=="All" ? "active" : ""}
className={activeIndex == "All" ? "active" : ""}
onClick={() => {
dispatch(setActivityFilters({ filters: {} }));
handleTitleClick({ index: "All" });
......@@ -163,7 +170,8 @@ const LetDiscover = ({ categories }) => {
<div className="col-12 text-center">
{!loading ? (
<div className="sub-categories">
{activityFilters.category && subCategories &&
{activityFilters.category &&
subCategories &&
subCategories.data.map((data, index) => (
<SubCategoryChips key={index} data={data} />
// <a key={index} onClick={() => handleToggleCloseIcon(index)}>
......
......@@ -30,12 +30,7 @@ const ListingInner = ({ allActivitiesData, loading, totalCount }) => {
const handleGridChange = className => {
setGridClass(className);
};
useEffect(() => {
console.log("router.query.category", router.query.category);
if (router.query.category) {
dispatch(setActivityFilters({ filters: { category: router.query.category, subCategories: [] } }));
}
}, []);
useEffect(() => {
const handleResize = () => {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!