Blame view

pages/vendor/reviews/index.js 1.27 KB
.  
jaymehta committed
1 2 3 4 5 6 7
import React, { useEffect } from "react";
import { useDispatch } from "react-redux";
import Reviews from "../../../components/admin/Reviews";
import Layout from "../../../components/layout/Layout";
import Sidebar from "../../../components/layout/VendorDashboardSidebar";
import { getActivitiesByVendor } from "../../../redux/actions/activityAction";
import { wrapper } from "../../../redux/store";
Chetan committed
8
import { GenericLayout } from "../../../components/layout/Generics/GenericLayout";
.  
jaymehta committed
9 10 11 12 13 14 15 16

const ReviewsPage = () => {
  const dispatch = useDispatch();
  useEffect(() => {
    dispatch(getActivitiesByVendor());
  }, []);

  return (
Chetan committed
17 18 19 20 21 22 23 24
    // <div>
    <GenericLayout>
      {/* <div className="sidebarContainer">
          <Sidebar /> */}
        <Reviews isVendor={true} />
      {/* </div> */}
    </GenericLayout>
    // </div>
.  
jaymehta committed
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
  );
};

export default ReviewsPage;

/** For server side rendering */
export const getServerSideProps = wrapper.getServerSideProps(store => async ({ req, query }) => {
  // await store.dispatch(loadUser());
  //   await store.dispatch(getActivitiesByVendor());
  // await store.dispatch(loadUser());
  // await store.dispatch(getActivitiesByVendor());
  // await store.dispatch(getAllCategories());
  // await store.dispatch(getAllSubCategories());
  return {
    props: {}
  };
});