Commit de99cb72 by jaymehta

.

1 parent 2f53fef8
...@@ -15,6 +15,7 @@ import { cleanImage } from "../../services/imageHandling.js"; ...@@ -15,6 +15,7 @@ import { cleanImage } from "../../services/imageHandling.js";
import { useRouter } from "next/router.js"; import { useRouter } from "next/router.js";
import WishlistComponent from "../detail/WIshlistComponent.js"; import WishlistComponent from "../detail/WIshlistComponent.js";
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
import Link from "next/link.js";
const BrowseExperiences = ({ allActivitiesData }) => { const BrowseExperiences = ({ allActivitiesData }) => {
const { endUser } = useSelector(state => state.endUser); const { endUser } = useSelector(state => state.endUser);
...@@ -34,14 +35,16 @@ const BrowseExperiences = ({ allActivitiesData }) => { ...@@ -34,14 +35,16 @@ const BrowseExperiences = ({ allActivitiesData }) => {
</div> </div>
</motion.div> </motion.div>
<div className="view-all-btn"> <div className="view-all-btn">
<Button <Link href={"/listing"} prefetch={true}>
variant="primary" <Button
onClick={() => { variant="primary"
router.push("/listing"); // onClick={() => {
}} // router.push("/listing");
> // }}
View All >
</Button> View All
</Button>
</Link>
</div> </div>
</div> </div>
</div> </div>
...@@ -115,14 +118,16 @@ const BrowseExperiences = ({ allActivitiesData }) => { ...@@ -115,14 +118,16 @@ const BrowseExperiences = ({ allActivitiesData }) => {
<div className="">Includes taxes & Fees</div> <div className="">Includes taxes & Fees</div>
</div> </div>
<div className="explore-now"> <div className="explore-now">
<Button <Link href={`/activities/${data.id}`}>
onClick={() => { <Button
router.push(`/activities/${data.id}`); // onClick={() => {
}} // router.push(`/activities/${data.id}`);
variant="primary" // }}
> variant="primary"
Explore Now >
</Button> Explore Now
</Button>
</Link>
</div> </div>
</div> </div>
</div> </div>
......
import React, { Fragment, useEffect } from "react"; import React, { Fragment, useEffect } from "react";
import Banner from "./Banner"; // import Banner from "./Banner";
import SearchBar from "./SearchBar"; // import SearchBar from "./SearchBar";
import LetDiscover from "./LetDiscover"; // import LetDiscover from "./LetDiscover";
import BrowseExperiences from "./BrowseExperiences"; // import BrowseExperiences from "./BrowseExperiences";
import GiftAnExperience from "./GiftAnExperience"; // import GiftAnExperience from "./GiftAnExperience";
import Testimonial from "./Testimonial"; // import Testimonial from "./Testimonial";
import SignUpToExperienceOurPlatform from "./SignUpToExperienceOurPlatform"; // import SignUpToExperienceOurPlatform from "./SignUpToExperienceOurPlatform";
import { useDispatch, useSelector } from "react-redux"; import { useDispatch, useSelector } from "react-redux";
import dynamic from "next/dynamic";
const Banner = dynamic(() => import("./Banner"));
const SearchBar = dynamic(() => import("./SearchBar"));
const LetDiscover = dynamic(() => import("./LetDiscover"));
const BrowseExperiences = dynamic(() => import("./BrowseExperiences"));
const GiftAnExperience = dynamic(() => import("./GiftAnExperience"));
const Testimonial = dynamic(() => import("./Testimonial"));
const SignUpToExperienceOurPlatform = dynamic(() => import("./SignUpToExperienceOurPlatform"));
const Home = () => { const Home = () => {
const { categories } = useSelector(state => state.categories); const { categories } = useSelector(state => state.categories);
......
...@@ -33,7 +33,7 @@ const LetDiscover = ({ categories }) => { ...@@ -33,7 +33,7 @@ const LetDiscover = ({ categories }) => {
</div> </div>
</motion.div> </motion.div>
<div className="view-all-btn"> <div className="view-all-btn">
<Link href={"/listing"} > <Link href={"/listing"} prefetch={true}>
<Button <Button
// onClick={() => { // onClick={() => {
// router.push("/listing"); // router.push("/listing");
......
import React, { Fragment, useEffect } from "react"; import React, { Fragment, useEffect } from "react";
import ListingInner from "./ListingInner"; // import ListingInner from "./ListingInner";
import SignUpToExperienceOurPlatform from "../home/SignUpToExperienceOurPlatform"; // import SignUpToExperienceOurPlatform from "../home/SignUpToExperienceOurPlatform";
import LetDiscover from "./LetDiscover"; // import LetDiscover from "./LetDiscover";
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
import dynamic from "next/dynamic";
const LetDiscover = dynamic(() => import("./LetDiscover"));
const ListingInner = dynamic(() => import("./ListingInner"));
const SignUpToExperienceOurPlatform = dynamic(() => import("../home/SignUpToExperienceOurPlatform"));
const Listing = () => { const Listing = () => {
const { allActivitiesData, loading, totalCount } = useSelector(sate => sate.allActivitiesData); const { allActivitiesData, loading, totalCount } = useSelector(sate => sate.allActivitiesData);
const { categories } = useSelector(sate => sate.categories); const { categories } = useSelector(sate => sate.categories);
const { subCategories } = useSelector(sate => sate.subCategories); const { subCategories } = useSelector(sate => sate.subCategories);
console.log("allActivitiesData >>>> 123", allActivitiesData); console.log("allActivitiesData >>>> 123", allActivitiesData);
return ( return (
<Fragment> <Fragment>
<main> <main>
<LetDiscover categories={categories} subCategories={subCategories}/> <LetDiscover categories={categories} subCategories={subCategories} />
<ListingInner allActivitiesData={allActivitiesData} loading={loading} totalCount={totalCount} /> <ListingInner allActivitiesData={allActivitiesData} loading={loading} totalCount={totalCount} />
<SignUpToExperienceOurPlatform /> <SignUpToExperienceOurPlatform />
</main> </main>
......
...@@ -7,6 +7,7 @@ import { getTestimonial } from "../redux/actions/testimonialAction"; ...@@ -7,6 +7,7 @@ import { getTestimonial } from "../redux/actions/testimonialAction";
import { loadUser } from "../redux/actions/userActions"; import { loadUser } from "../redux/actions/userActions";
import { wrapper } from "../redux/store"; import { wrapper } from "../redux/store";
export default function IndexPage() { export default function IndexPage() {
/** Client side rendering, traditional API call. */ /** Client side rendering, traditional API call. */
// const dispatch = useDispatch(); // const dispatch = useDispatch();
......
import { useRouter } from "next/router";
import { useEffect } from "react";
import { useDispatch } from "react-redux";
import Layout from "../components/layout/Layout"; import Layout from "../components/layout/Layout";
import Listing from "../components/listing/Listing"; // import Listing from "../components/listing/Listing";
import { getActivitiesByFilters } from "../redux/actions/activityAction"; import { getActivitiesByFilters } from "../redux/actions/activityAction";
import { getAllCategories, getAllSubCategories, getSubCategoriesByCategoryId } from "../redux/actions/categoriesAction"; import { getAllCategories, getSubCategoriesByCategoryId } from "../redux/actions/categoriesAction";
import { wrapper } from "../redux/store"; import { wrapper } from "../redux/store";
import dynamic from "next/dynamic";
const Listing = dynamic(() => import("../components/listing/Listing"));
export default function ListingPage() { export default function ListingPage() {
/** Client side rendering, traditional API call. */ /** Client side rendering, traditional API call. */
const router = useRouter();
const dispatch = useDispatch();
// useEffect(() => { // useEffect(() => {
// dispatch(getActivitiesByFilters({ currentPage: router.query.page })); // dispatch(getActivitiesByFilters({ currentPage: router.query.page }));
// }, []); // }, []);
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!