From 87cef2ca919bde8bab1f941d777e9aa3903c72f2 Mon Sep 17 00:00:00 2001 From: Yusmardianto Date: Mon, 8 Mar 2021 09:03:40 +0700 Subject: [PATCH] yarn build --- api/product/accessories.js | 35 +++++++ ...-tshirt-template-angle-white-etsy-thumbnail.png | Bin 0 -> 4995 bytes pages-sections/product/accessories.js | 2 +- pages-sections/product/accessories_details.js | 109 +++++++++++++++++++++ pages-sections/product/apparel.js | 2 +- pages-sections/product/apparel_details.js | 109 +++++++++++++++++++++ pages-sections/product/helmet.js | 2 +- pages-sections/product/helmet_details.js | 109 +++++++++++++++++++++ pages-sections/product/yamalube.js | 2 +- pages-sections/product/yamalube_details.js | 109 +++++++++++++++++++++ pages-sections/product/ygp.js | 2 +- pages-sections/product/ygp_details.js | 97 ++++++++++++++++++ pages/product/accessories_details.js | 55 +++++++++++ pages/product/apparel_details.js | 55 +++++++++++ pages/product/helmet_details.js | 55 +++++++++++ pages/product/yamalube_details.js | 55 +++++++++++ pages/product/ygp_details.js | 55 +++++++++++ 17 files changed, 848 insertions(+), 5 deletions(-) create mode 100644 assets/img/png-transparent-white-crew-neck-t-shirt-shetland-sheepdog-t-shirt-hoodie-polo-shirt-tshirt-template-angle-white-etsy-thumbnail.png create mode 100644 pages/product/accessories_details.js create mode 100644 pages/product/apparel_details.js create mode 100644 pages/product/helmet_details.js create mode 100644 pages/product/yamalube_details.js create mode 100644 pages/product/ygp_details.js diff --git a/api/product/accessories.js b/api/product/accessories.js index 00222d9..c6c6200 100644 --- a/api/product/accessories.js +++ b/api/product/accessories.js @@ -100,10 +100,45 @@ async function GetAccessories(token="") { return res; } +async function GetDetailAccessories(id, token="") { + var res = await apollo.query( + ` + query($input: ID!){ + accessories(where:{id:$input}) + { + id + name + description + price + part_code + img { + url + } + img_relate1{ + url + } + img_relate2{ + url + } + img_relate3{ + url + } + stock + } + } `, + token, + { + "input": id + } + ); + return res; +} + module.exports = { GetYGP:GetYGP, GetYamalube:GetYamalube, GetHelmet:GetHelmet, GetApparel:GetApparel, GetAccessories:GetAccessories, + GetDetailAccessories:GetDetailAccessories, }; \ No newline at end of file diff --git a/assets/img/png-transparent-white-crew-neck-t-shirt-shetland-sheepdog-t-shirt-hoodie-polo-shirt-tshirt-template-angle-white-etsy-thumbnail.png b/assets/img/png-transparent-white-crew-neck-t-shirt-shetland-sheepdog-t-shirt-hoodie-polo-shirt-tshirt-template-angle-white-etsy-thumbnail.png new file mode 100644 index 0000000000000000000000000000000000000000..66168c4ad310bcdd5072f818ba23195bf303772e GIT binary patch literal 4995 zcmV-}6MXE6P)DO)=s$u1vFIOs89 zj@+P6h=%-`gn~|{88IuzF-B=tP(wo}$3$kXf=-ewB@X8{1ay>~^RG4?ITnw&9?Oa2Gfl0vl4FLAE`KWI9Y1_zdXW+(8lg4&WHc*cqbr8fUo)W+*F2=(Jz)w;M9HyH zdinF=4HwSf=;5D_c^;VljEaYYKOa$Ryn1oyKy z#~AYQj8nfLG>w9bH7{7GjF~+O&HbTHuRlrJp0RXgPucVI<>jE`Cn^5L=uDDZF^=B< z_#pFs`112jNx|9YxFOSo9Oo}D22CT%ZAD@`r1BW?5lj4!>c5=P*it+qn%=IH7lJO- znT$6EN%oxbanEu_kI+#4*t@UirmTc23WPX1VjN zu5KzYY-@3LiwaLE+s(6}S@~L5XAW@21b*S-rI|9RViL_CuOpij$k^GS&S({Bn*r=e zJLtzAF#)LiQs0P#zBf@B(`{TB?N1y0sbY(Q(-oR&v&z%S;bqD6!@38VaqZaaAI>?i%346PstT8a4IM6y zVi{j1{PtqgZPEwKu-%~9W4dhWX7Fe@Dpvv~GrZvNbJL$uFH0V>8#GDHi5WLaZqCdL zSv6~LNtj#kqeX)x&sQy>d17vn{VX`dnO!vG0!FD-Unjkb9iaENeP`}=rwHBIXf%Hy z6PtS^$#A-kt)YLn?u4Fj+3hW~8mrtq*AA;{=XX*)+CtCl`}?s77R?T1htjC@Asgyt zVhO!+Wy2QB!U}qe{&1W$D^jjYe*dTnTJhTNy8&CoNqYZ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6<6)HI_dxb N002ovPDHLkV1fb3t6l&A literal 0 HcmV?d00001 diff --git a/pages-sections/product/accessories.js b/pages-sections/product/accessories.js index af79655..4b84795 100644 --- a/pages-sections/product/accessories.js +++ b/pages-sections/product/accessories.js @@ -36,7 +36,7 @@ const DataAccessories = function ({ backend, accessories, ...props }) {

Rp.{data.price}

diff --git a/pages-sections/product/accessories_details.js b/pages-sections/product/accessories_details.js index e69de29..e7a326e 100644 --- a/pages-sections/product/accessories_details.js +++ b/pages-sections/product/accessories_details.js @@ -0,0 +1,109 @@ +import React, { useState, useEffect } from "react"; +import classNames from "classnames"; +import { makeStyles } from "@material-ui/core/styles"; +import ReactHtmlParser from "react-html-parser"; +import Dashboard from "@material-ui/icons/Dashboard"; +import Icon from "@material-ui/core/Icon"; + +import GridContainer from "components/Grid/GridContainer.js"; +import Grid from '@material-ui/core/Grid'; +import GridItem from "components/Grid/GridItem.js"; +import NavPills from "components/NavPills/NavPills.js"; +import Card from "components/Card/Card.js"; +import CardBody from "components/Card/CardBody.js"; +import CardHeader from "components/Card/CardHeader.js"; +import CardFooter from "components/Card/CardFooter.js"; +import Button from "components/CustomButtons/Button.js"; +import styles from "assets/jss/nextjs-material-kit/pages/profilePage.js"; +import Carousel from "react-slick"; + +const useStyles = makeStyles(styles); + +const DetailDataAccessories = function ({ backend, detailaccessories, ...props }) { + const classes = useStyles(); + const { ...rest } = props; + const imageClasses = classNames( + classes.imgRaised, + classes.imgRoundedCircle, + classes.imgFluid + ); + const settings = { + dots: true, + infinite: true, + speed: 500, + slidesToShow: 1, + slidesToScroll: 1, + autoplay: true, + time: 5 + }; + const navImageClasses = classNames(classes.imgRounded, classes.imgGallery); + const Accessoriesdetails = detailaccessories.map((data) => { + return ( +
+ + +
+
+
+ + + + + First slide + + + + +
+
+
+
+ +

{data.name}

+

Rp.{data.price}

+
+
    +
  • Stock : {data.stock}

  • +
  • Part Code : {data.part_code}

  • +
+
+
+ + + + + + + + + + + +
+
+

Deskripsi

+
+
+

{ReactHtmlParser(data.description)}

+
+
+ ); + }) + return ( + +
+ Product Detail +
+ +
+ {Accessoriesdetails} +
+
+ + © 2020 , All Right Reserved by @Thamrin Brother Company + +
+ ); +} + +export default DetailDataAccessories; \ No newline at end of file diff --git a/pages-sections/product/apparel.js b/pages-sections/product/apparel.js index c7ecb05..5e0768f 100644 --- a/pages-sections/product/apparel.js +++ b/pages-sections/product/apparel.js @@ -35,7 +35,7 @@ const DataApparel = function ({ backend, apparel, ...props }) {

Rp.{data.price}

diff --git a/pages-sections/product/apparel_details.js b/pages-sections/product/apparel_details.js index e69de29..f66d897 100644 --- a/pages-sections/product/apparel_details.js +++ b/pages-sections/product/apparel_details.js @@ -0,0 +1,109 @@ +import React, { useState, useEffect } from "react"; +import classNames from "classnames"; +import { makeStyles } from "@material-ui/core/styles"; +import ReactHtmlParser from "react-html-parser"; +import Dashboard from "@material-ui/icons/Dashboard"; +import Icon from "@material-ui/core/Icon"; + +import GridContainer from "components/Grid/GridContainer.js"; +import Grid from '@material-ui/core/Grid'; +import GridItem from "components/Grid/GridItem.js"; +import NavPills from "components/NavPills/NavPills.js"; +import Card from "components/Card/Card.js"; +import CardBody from "components/Card/CardBody.js"; +import CardHeader from "components/Card/CardHeader.js"; +import CardFooter from "components/Card/CardFooter.js"; +import Button from "components/CustomButtons/Button.js"; +import styles from "assets/jss/nextjs-material-kit/pages/profilePage.js"; +import Carousel from "react-slick"; + +const useStyles = makeStyles(styles); + +const DetailDataApparel = function ({ backend, detailapparel, ...props }) { + const classes = useStyles(); + const { ...rest } = props; + const imageClasses = classNames( + classes.imgRaised, + classes.imgRoundedCircle, + classes.imgFluid + ); + const settings = { + dots: true, + infinite: true, + speed: 500, + slidesToShow: 1, + slidesToScroll: 1, + autoplay: true, + time: 5 + }; + const navImageClasses = classNames(classes.imgRounded, classes.imgGallery); + const Appareldetails = detailapparel.map((data) => { + return ( +
+ + +
+
+
+ + + + + First slide + + + + +
+
+
+
+ +

{data.name}

+

Rp.{data.price}

+
+
    +
  • Stock : {data.stock}

  • +
  • Part Code : {data.part_code}

  • +
+
+
+ + + + + + + + + + + +
+
+

Deskripsi

+
+
+

{ReactHtmlParser(data.description)}

+
+
+ ); + }) + return ( + +
+ Product Detail +
+ +
+ {Appareldetails} +
+
+ + © 2020 , All Right Reserved by @Thamrin Brother Company + +
+ ); +} + +export default DetailDataApparel; \ No newline at end of file diff --git a/pages-sections/product/helmet.js b/pages-sections/product/helmet.js index 22f0b3a..09c3ac9 100644 --- a/pages-sections/product/helmet.js +++ b/pages-sections/product/helmet.js @@ -35,7 +35,7 @@ const DataHelmet = function ({ backend, helmet, ...props }) {

Rp.{data.price}

diff --git a/pages-sections/product/helmet_details.js b/pages-sections/product/helmet_details.js index e69de29..93c32a0 100644 --- a/pages-sections/product/helmet_details.js +++ b/pages-sections/product/helmet_details.js @@ -0,0 +1,109 @@ +import React, { useState, useEffect } from "react"; +import classNames from "classnames"; +import { makeStyles } from "@material-ui/core/styles"; +import ReactHtmlParser from "react-html-parser"; +import Dashboard from "@material-ui/icons/Dashboard"; +import Icon from "@material-ui/core/Icon"; + +import GridContainer from "components/Grid/GridContainer.js"; +import Grid from '@material-ui/core/Grid'; +import GridItem from "components/Grid/GridItem.js"; +import NavPills from "components/NavPills/NavPills.js"; +import Card from "components/Card/Card.js"; +import CardBody from "components/Card/CardBody.js"; +import CardHeader from "components/Card/CardHeader.js"; +import CardFooter from "components/Card/CardFooter.js"; +import Button from "components/CustomButtons/Button.js"; +import styles from "assets/jss/nextjs-material-kit/pages/profilePage.js"; +import Carousel from "react-slick"; + +const useStyles = makeStyles(styles); + +const DetailDataHelmet = function ({ backend, detailhelmet, ...props }) { + const classes = useStyles(); + const { ...rest } = props; + const imageClasses = classNames( + classes.imgRaised, + classes.imgRoundedCircle, + classes.imgFluid + ); + const settings = { + dots: true, + infinite: true, + speed: 500, + slidesToShow: 1, + slidesToScroll: 1, + autoplay: true, + time: 5 + }; + const navImageClasses = classNames(classes.imgRounded, classes.imgGallery); + const Helmetdetails = detailhelmet.map((data) => { + return ( +
+ + +
+
+
+ + + + + First slide + + + + +
+
+
+
+ +

{data.name}

+

Rp.{data.price}

+
+
    +
  • Stock : {data.stock}

  • +
  • Part Code : {data.part_code}

  • +
+
+
+ + + + + + + + + + + +
+
+

Deskripsi

+
+
+

{ReactHtmlParser(data.description)}

+
+
+ ); + }) + return ( + +
+ Product Detail +
+ +
+ {Helmetdetails} +
+
+ + © 2020 , All Right Reserved by @Thamrin Brother Company + +
+ ); +} + +export default DetailDataHelmet; \ No newline at end of file diff --git a/pages-sections/product/yamalube.js b/pages-sections/product/yamalube.js index 74e032d..1c65e51 100644 --- a/pages-sections/product/yamalube.js +++ b/pages-sections/product/yamalube.js @@ -35,7 +35,7 @@ const DataYamalube = function ({ backend, yamalube, ...props }) {

Rp.{data.price}

diff --git a/pages-sections/product/yamalube_details.js b/pages-sections/product/yamalube_details.js index e69de29..cacb1cc 100644 --- a/pages-sections/product/yamalube_details.js +++ b/pages-sections/product/yamalube_details.js @@ -0,0 +1,109 @@ +import React, { useState, useEffect } from "react"; +import classNames from "classnames"; +import { makeStyles } from "@material-ui/core/styles"; +import ReactHtmlParser from "react-html-parser"; +import Dashboard from "@material-ui/icons/Dashboard"; +import Icon from "@material-ui/core/Icon"; + +import GridContainer from "components/Grid/GridContainer.js"; +import Grid from '@material-ui/core/Grid'; +import GridItem from "components/Grid/GridItem.js"; +import NavPills from "components/NavPills/NavPills.js"; +import Card from "components/Card/Card.js"; +import CardBody from "components/Card/CardBody.js"; +import CardHeader from "components/Card/CardHeader.js"; +import CardFooter from "components/Card/CardFooter.js"; +import Button from "components/CustomButtons/Button.js"; +import styles from "assets/jss/nextjs-material-kit/pages/profilePage.js"; +import Carousel from "react-slick"; + +const useStyles = makeStyles(styles); + +const DetailDataYamalube = function ({ backend, detailyamalube, ...props }) { + const classes = useStyles(); + const { ...rest } = props; + const imageClasses = classNames( + classes.imgRaised, + classes.imgRoundedCircle, + classes.imgFluid + ); + const settings = { + dots: true, + infinite: true, + speed: 500, + slidesToShow: 1, + slidesToScroll: 1, + autoplay: true, + time: 5 + }; + const navImageClasses = classNames(classes.imgRounded, classes.imgGallery); + const Yamalubedetails = detailyamalube.map((data) => { + return ( +
+ + +
+
+
+ + + + + First slide + + + + +
+
+
+
+ +

{data.name}

+

Rp.{data.price}

+
+
    +
  • Stock : {data.stock}

  • +
  • Part Code : {data.part_code}

  • +
+
+
+ {/* + + + + + + + + + + */} +
+
+

Deskripsi

+
+
+

{ReactHtmlParser(data.description)}

+
+
+ ); + }) + return ( + +
+ Product Detail +
+ +
+ {Yamalubedetails} +
+
+ + © 2020 , All Right Reserved by @Thamrin Brother Company + +
+ ); +} + +export default DetailDataYamalube; \ No newline at end of file diff --git a/pages-sections/product/ygp.js b/pages-sections/product/ygp.js index f1d7774..acbdcc9 100644 --- a/pages-sections/product/ygp.js +++ b/pages-sections/product/ygp.js @@ -35,7 +35,7 @@ const DataYGP = function ({ backend, ygp, ...props }) {

Rp.{data.price}

diff --git a/pages-sections/product/ygp_details.js b/pages-sections/product/ygp_details.js index e69de29..f0886c7 100644 --- a/pages-sections/product/ygp_details.js +++ b/pages-sections/product/ygp_details.js @@ -0,0 +1,97 @@ +import React, { useState, useEffect } from "react"; +import classNames from "classnames"; +import { makeStyles } from "@material-ui/core/styles"; +import ReactHtmlParser from "react-html-parser"; +import Dashboard from "@material-ui/icons/Dashboard"; +import Icon from "@material-ui/core/Icon"; + +import GridContainer from "components/Grid/GridContainer.js"; +import Grid from '@material-ui/core/Grid'; +import GridItem from "components/Grid/GridItem.js"; +import NavPills from "components/NavPills/NavPills.js"; +import Card from "components/Card/Card.js"; +import CardBody from "components/Card/CardBody.js"; +import CardHeader from "components/Card/CardHeader.js"; +import CardFooter from "components/Card/CardFooter.js"; +import Button from "components/CustomButtons/Button.js"; +import styles from "assets/jss/nextjs-material-kit/pages/profilePage.js"; + +const useStyles = makeStyles(styles); + +const DetailDataYGP = function ({ backend, detailygp, ...props }) { + const classes = useStyles(); + const { ...rest } = props; + const imageClasses = classNames( + classes.imgRaised, + classes.imgRoundedCircle, + classes.imgFluid + ); + const navImageClasses = classNames(classes.imgRounded, classes.imgGallery); + const YGPdetails = detailygp.map((data) => { + return ( +
+ + +
+
+
+ + + + First slide + + + +
+
+
+
+ +

{data.name}

+

Rp.{data.price}

+
+
    +
  • Stock : {data.stock}

  • +
  • Part Code : {data.part_code}

  • +
+
+
+ + + + + + + + + + + +
+
+

Deskripsi

+
+
+

{ReactHtmlParser(data.description)}

+
+
+ ); + }) + return ( + +
+ Product Detail +
+ +
+ {YGPdetails} +
+
+ + © 2020 , All Right Reserved by @Thamrin Brother Company + +
+ ); +} + +export default DetailDataYGP; \ No newline at end of file diff --git a/pages/product/accessories_details.js b/pages/product/accessories_details.js new file mode 100644 index 0000000..5f41927 --- /dev/null +++ b/pages/product/accessories_details.js @@ -0,0 +1,55 @@ +import React from "react"; +import classNames from "classnames"; +import { makeStyles } from "@material-ui/core/styles"; + +import Header from "components/Header/Header.js"; +import HeaderLinks from "components/Header/HeaderLinks.js"; +import Footer from "components/Footer/Footer.js"; +import AccessoriesDetail from "pages-sections/product/accessories_details.js"; +import Parallax from "components/Parallax/Parallax.js"; +import styles from "assets/jss/nextjs-material-kit/pages/components.js"; +import GetDetailAccessories from "../../api/product/accessories.js" + +const useStyles = makeStyles(styles); + +const AccessoriesDetails = function ({ backend, detailaccessories, ...props }) { + const classes = useStyles(); + const { ...rest } = props; + return ( +
+
} + fixed + color="info" + changeColorOnScroll={{ + height: 400, + color: "white" + }} + {...rest} + /> + +
+ +
+
+
+ ); +} + +export default AccessoriesDetails; + +export async function getServerSideProps(context) { + var {query} = context; + var detailaccessories = []; + const backend = process.env.BACKEND_SERVER_URI; + + var res = await GetDetailAccessories.GetDetailAccessories(query.s||0); + if (res["STATUS"] === 1) { + detailaccessories = res["DATA"]["accessories"]; + } + console.log(detailaccessories); + + return { + props: { detailaccessories, backend }, // will be passed to the page component as props + }; +} \ No newline at end of file diff --git a/pages/product/apparel_details.js b/pages/product/apparel_details.js new file mode 100644 index 0000000..c378c03 --- /dev/null +++ b/pages/product/apparel_details.js @@ -0,0 +1,55 @@ +import React from "react"; +import classNames from "classnames"; +import { makeStyles } from "@material-ui/core/styles"; + +import Header from "components/Header/Header.js"; +import HeaderLinks from "components/Header/HeaderLinks.js"; +import Footer from "components/Footer/Footer.js"; +import ApparelDetail from "pages-sections/product/apparel_details.js"; +import Parallax from "components/Parallax/Parallax.js"; +import styles from "assets/jss/nextjs-material-kit/pages/components.js"; +import GetDetailApparel from "../../api/product/accessories.js" + +const useStyles = makeStyles(styles); + +const ApparelDetails = function ({ backend, detailapparel, ...props }) { + const classes = useStyles(); + const { ...rest } = props; + return ( +
+
} + fixed + color="info" + changeColorOnScroll={{ + height: 400, + color: "white" + }} + {...rest} + /> + +
+ +
+
+
+ ); +} + +export default ApparelDetails; + +export async function getServerSideProps(context) { + var {query} = context; + var detailapparel = []; + const backend = process.env.BACKEND_SERVER_URI; + + var res = await GetDetailApparel.GetDetailAccessories(query.s||0); + if (res["STATUS"] === 1) { + detailapparel = res["DATA"]["accessories"]; + } + console.log(detailapparel); + + return { + props: { detailapparel, backend }, // will be passed to the page component as props + }; +} \ No newline at end of file diff --git a/pages/product/helmet_details.js b/pages/product/helmet_details.js new file mode 100644 index 0000000..e70a7f8 --- /dev/null +++ b/pages/product/helmet_details.js @@ -0,0 +1,55 @@ +import React from "react"; +import classNames from "classnames"; +import { makeStyles } from "@material-ui/core/styles"; + +import Header from "components/Header/Header.js"; +import HeaderLinks from "components/Header/HeaderLinks.js"; +import Footer from "components/Footer/Footer.js"; +import HelmetDetail from "pages-sections/product/helmet_details.js"; +import Parallax from "components/Parallax/Parallax.js"; +import styles from "assets/jss/nextjs-material-kit/pages/components.js"; +import GetDetailHelmet from "../../api/product/accessories.js" + +const useStyles = makeStyles(styles); + +const HelmetDetails = function ({ backend, detailhelmet, ...props }) { + const classes = useStyles(); + const { ...rest } = props; + return ( +
+
} + fixed + color="info" + changeColorOnScroll={{ + height: 400, + color: "white" + }} + {...rest} + /> + +
+ +
+
+
+ ); +} + +export default HelmetDetails; + +export async function getServerSideProps(context) { + var {query} = context; + var detailhelmet = []; + const backend = process.env.BACKEND_SERVER_URI; + + var res = await GetDetailHelmet.GetDetailAccessories(query.s||0); + if (res["STATUS"] === 1) { + detailhelmet = res["DATA"]["accessories"]; + } + console.log(detailhelmet); + + return { + props: { detailhelmet, backend }, // will be passed to the page component as props + }; +} \ No newline at end of file diff --git a/pages/product/yamalube_details.js b/pages/product/yamalube_details.js new file mode 100644 index 0000000..6c38e0b --- /dev/null +++ b/pages/product/yamalube_details.js @@ -0,0 +1,55 @@ +import React from "react"; +import classNames from "classnames"; +import { makeStyles } from "@material-ui/core/styles"; + +import Header from "components/Header/Header.js"; +import HeaderLinks from "components/Header/HeaderLinks.js"; +import Footer from "components/Footer/Footer.js"; +import YamalubeDetail from "pages-sections/product/yamalube_details.js"; +import Parallax from "components/Parallax/Parallax.js"; +import styles from "assets/jss/nextjs-material-kit/pages/components.js"; +import GetDetailYamalube from "../../api/product/accessories.js" + +const useStyles = makeStyles(styles); + +const YamalubeDetails = function ({ backend, detailyamalube, ...props }) { + const classes = useStyles(); + const { ...rest } = props; + return ( +
+
} + fixed + color="info" + changeColorOnScroll={{ + height: 400, + color: "white" + }} + {...rest} + /> + +
+ +
+
+
+ ); +} + +export default YamalubeDetails; + +export async function getServerSideProps(context) { + var {query} = context; + var detailyamalube = []; + const backend = process.env.BACKEND_SERVER_URI; + + var res = await GetDetailYamalube.GetDetailAccessories(query.s||0); + if (res["STATUS"] === 1) { + detailyamalube = res["DATA"]["accessories"]; + } + console.log(detailyamalube); + + return { + props: { detailyamalube, backend }, // will be passed to the page component as props + }; +} \ No newline at end of file diff --git a/pages/product/ygp_details.js b/pages/product/ygp_details.js new file mode 100644 index 0000000..4e27082 --- /dev/null +++ b/pages/product/ygp_details.js @@ -0,0 +1,55 @@ +import React from "react"; +import classNames from "classnames"; +import { makeStyles } from "@material-ui/core/styles"; + +import Header from "components/Header/Header.js"; +import HeaderLinks from "components/Header/HeaderLinks.js"; +import Footer from "components/Footer/Footer.js"; +import YGPDetail from "pages-sections/product/ygp_details.js"; +import Parallax from "components/Parallax/Parallax.js"; +import styles from "assets/jss/nextjs-material-kit/pages/components.js"; +import GetDetailYGP from "../../api/product/accessories.js" + +const useStyles = makeStyles(styles); + +const YGPDetails = function ({ backend, detailygp, ...props }) { + const classes = useStyles(); + const { ...rest } = props; + return ( +
+
} + fixed + color="info" + changeColorOnScroll={{ + height: 400, + color: "white" + }} + {...rest} + /> + +
+ +
+
+ ); +} + +export default YGPDetails; + +export async function getServerSideProps(context) { + var {query} = context; + var detailygp = []; + const backend = process.env.BACKEND_SERVER_URI; + + var res = await GetDetailYGP.GetDetailAccessories(query.s||0); + if (res["STATUS"] === 1) { + detailygp = res["DATA"]["accessories"]; + } + console.log(detailygp); + + return { + props: { detailygp, backend }, // will be passed to the page component as props + }; +} \ No newline at end of file