diff --git a/api/product/accessories.js b/api/product/accessories.js
new file mode 100644
index 0000000..3806975
--- /dev/null
+++ b/api/product/accessories.js
@@ -0,0 +1,46 @@
+import apollo from "../../lib/apollo.js";
+
+async function GetYGP(token="") {
+ var res = await apollo.query(
+ `
+ query {
+ accessories(where: { category: "YGP" }) {
+ id
+ name
+ description
+ price
+ part_code
+ img {
+ url
+ }
+ }
+ }`,
+ token
+ );
+ return res;
+}
+
+async function GetYamalube(token="") {
+ var res = await apollo.query(
+ `
+ query {
+ accessories(where: { category: "Yamalube" }) {
+ id
+ name
+ description
+ price
+ part_code
+ img {
+ url
+ }
+ }
+ }`,
+ token
+ );
+ return res;
+}
+
+module.exports = {
+ GetYGP:GetYGP,
+ GetYamalube:GetYamalube,
+};
\ No newline at end of file
diff --git a/api/product/product.js b/api/product/product.js
index c7994a3..15e446e 100644
--- a/api/product/product.js
+++ b/api/product/product.js
@@ -45,7 +45,6 @@ async function GetDetailProduct(id, token="") {
}
overview
specification
- accessories
film{
url
}
@@ -79,7 +78,6 @@ async function GetProductYamaha(token="") {
}
overview
specification
- accessories
film{
url
}
@@ -110,7 +108,6 @@ async function GetProductSuzuki(token="") {
}
overview
specification
- accessories
film{
url
}
@@ -141,7 +138,6 @@ async function GetProductHonda(token="") {
}
overview
specification
- accessories
film{
url
}
@@ -172,7 +168,6 @@ async function GetProductHino(token="") {
}
overview
specification
- accessories
film{
url
}
@@ -203,7 +198,6 @@ async function GetProductMercedes(token="") {
}
overview
specification
- accessories
film{
url
}
@@ -234,7 +228,6 @@ async function GetProductBPR(token="") {
}
overview
specification
- accessories
film{
url
}
@@ -265,7 +258,6 @@ async function GetProductEmilia(token="") {
}
overview
specification
- accessories
film{
url
}
@@ -296,7 +288,6 @@ async function GetProductHomes(token="") {
}
overview
specification
- accessories
film{
url
}
diff --git a/components/Header/HeaderLinks.js b/components/Header/HeaderLinks.js
index fa2b5e0..128d076 100644
--- a/components/Header/HeaderLinks.js
+++ b/components/Header/HeaderLinks.js
@@ -48,10 +48,10 @@ export default function HeaderLinks(props) {
}}
buttonIcon={Apps}
dropdownList={[
-
+
Motor
,
-
+
YGP
,
diff --git a/package.json b/package.json
index d402687..5671595 100644
--- a/package.json
+++ b/package.json
@@ -59,6 +59,7 @@
"react-slick": "0.25.2",
"react-swipeable-views": "0.13.9",
"rsuite": "^4.9.2",
+ "scss": "^0.2.4",
"styled-components": "5.1.0",
"webpack": "4.43.0"
}
diff --git a/pages-sections/product/product_details.js b/pages-sections/product/product_details.js
index 6fe5c7b..18b3df8 100644
--- a/pages-sections/product/product_details.js
+++ b/pages-sections/product/product_details.js
@@ -1,4 +1,4 @@
-import React from "react";
+import React, { useState, useEffect } from "react";
import classNames from "classnames";
import { makeStyles } from "@material-ui/core/styles";
import ReactHtmlParser from "react-html-parser";
@@ -50,9 +50,11 @@ const DataProduct = function ({ backend, detailproduct, ...props }) {
-
{ReactHtmlParser(data.description)}