Blame view

pages/vendor/business-details/index.js 1.03 KB
jaymehta committed
1 2
import React, { useEffect } from "react";
import { useDispatch } from "react-redux";
3 4
import Layout from "../../../components/layout/Layout";
import BusinessDetails from "../../../components/vendor/BusinessDetails";
jaymehta committed
5 6 7 8 9
import { loadUser } from "../../../redux/actions/userActions";
import { getVendorDetails } from "../../../redux/actions/vendorActions";
import { wrapper } from "../../../redux/store";
// import { loadUser } from "../redux/actions/userActions";
// import { wrapper } from "../redux/store";
10 11

export default function BusinessDetailsPage () {
jaymehta committed
12 13 14 15 16
    const dispatch = useDispatch()
    useEffect(() => {
        dispatch(getVendorDetails())
    }, [])
    
17 18 19 20 21
    return (
        <Layout>
            <BusinessDetails />
        </Layout>
    );
jaymehta committed
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
};


/** For server side rendering */
export const getServerSideProps = wrapper.getServerSideProps(store => async ({ req, query }) => {
    // Get the menu data.
  
    // get the locations data.
    // await store.dispatch(getVendorDetails())
  
    return {
      props: {},
      
    };
  });