Home.js 1.38 KB
import React, { Fragment, useEffect } from "react";
import Banner from "./Banner";
import SearchBar from "./SearchBar";
import LetDiscover from "./LetDiscover";
import BrowseExperiences from "./BrowseExperiences";
import GiftAnExperience from "./GiftAnExperience";
import Testimonial from "./Testimonial";
import SignUpToExperienceOurPlatform from "./SignUpToExperienceOurPlatform";
import { useDispatch, useSelector } from "react-redux";

const Home = () => {
  const { categories } = useSelector(state => state.categories);
  const { testimonial } = useSelector(sate => sate.testimonial);
  const { allActivitiesData } = useSelector(sate => sate.allActivitiesData);
  const { homeBanner } = useSelector(state => state.homeBanner);
  console.log("homeBanner", homeBanner);
  console.log("categories", categories);
  console.log("testimonial", testimonial);
  console.log("allActivitiesData", allActivitiesData);
  const dispatch = useDispatch();
  useEffect(() => {
    // dispatch(getHomePage())
  }, [dispatch]);
  return (
    <Fragment>
      <main>
        <Banner homeBanner={homeBanner} />
        <SearchBar />
        <LetDiscover categories={categories} />
        <BrowseExperiences allActivitiesData={allActivitiesData} />
        <GiftAnExperience />
        <Testimonial testimonial={testimonial} />
        <SignUpToExperienceOurPlatform />
      </main>
    </Fragment>
  );
};

export default Home;