import React from "react"; // nodejs library that concatenates classes import classNames from "classnames"; // react components for routing our app without refresh import Link from "next/link"; // @material-ui/core components import { makeStyles } from "@material-ui/core/styles"; // @material-ui/icons // core components import Header from "components/Header/Header.js"; import HeaderLinks from "components/Header/HeaderLinks.js"; import Footer from "components/Footer/Footer.js"; import GridContainer from "components/Grid/GridContainer.js"; import GridItem from "components/Grid/GridItem.js"; import SectionProduct from "pages-sections/SectionProduct.js"; import Parallax from "components/Parallax/Parallax.js"; import styles from "assets/jss/nextjs-material-kit/pages/components.js"; import Getproduct from "../api/product/product.js" const useStyles = makeStyles(styles); export default function Components(props) { const classes = useStyles(); const { ...rest } = props; return (
} fixed color="info" changeColorOnScroll={{ height: 400, color: "white" }} {...rest} />
{/*

NextJS Material Kit.

A Badass Material Kit based on Material-UI and NextJS.

*/}
); } export async function getServerSideProps(context) { var product = []; var res = await Getproduct.GetProduct(); if (res["STATUS"] === 1) { product = res["DATA"]["products"]; } return { props: { product }, // will be passed to the page component as props }; }