detail.js
842 Bytes
import Detail from "../components/detail/Detail";
import Home from "../components/home/Home";
import Layout from "../components/layout/Layout";
import Listing from "../components/listing/Listing";
import { wrapper } from "../redux/store";
export default function DetailPage() {
/** Client side rendering, traditional API call. */
// const dispatch = useDispatch();
// useEffect(() => {
// const fetchData = async () => {
// await dispatch(getProjects({ currentPage: 1, featuredOnHome: true }));
// };
// fetchData();
// });
return (
<Layout>
<Detail />
</Layout>
);
}
/** For server side rendering */
export const getServerSideProps = wrapper.getServerSideProps(store => async ({ req, query }) => {
// Get the menu data.
// get the locations data.
return {
props: {},
};
});