diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-10-05 10:35:30 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-10-05 10:35:30 +0700 |
| commit | e9f65fadbfcf319db1f2f73e0984acad4f9aa505 (patch) | |
| tree | a9e3a1a3048298c3a8a41284e7b8fce16ab45453 /src | |
| parent | 760a7199aafb1d7f995611f9b6bca1379dfc4b65 (diff) | |
error query params
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/components/elements/Product/cartProductsList.jsx | 1 | ||||
| -rw-r--r-- | src/pages/api/shop/product-detail.js | 2 | ||||
| -rw-r--r-- | src/pages/shop/product/[slug].jsx | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/src/core/components/elements/Product/cartProductsList.jsx b/src/core/components/elements/Product/cartProductsList.jsx index 7a95f1f1..5887b425 100644 --- a/src/core/components/elements/Product/cartProductsList.jsx +++ b/src/core/components/elements/Product/cartProductsList.jsx @@ -15,6 +15,7 @@ const CardProdcuctsList = ({ updateQuantity = () => {}, setDeleteConfirmation = () => {} }) => { + return ( <table className='table-cart'> <thead> diff --git a/src/pages/api/shop/product-detail.js b/src/pages/api/shop/product-detail.js index e77ae53a..8571b623 100644 --- a/src/pages/api/shop/product-detail.js +++ b/src/pages/api/shop/product-detail.js @@ -10,7 +10,7 @@ export default async function handler(req, res) { process.env.SOLR_HOST + `/solr/variants/select?q=template_id_i:${req.query.id}&q.op=OR&indent=true&rows=100` ) - let auth = req.query.auth + let auth = JSON.parse(req.query.auth) let result = productMappingSolr(productTemplate.data.response.docs, auth || false) result[0].variants = variantsMappingSolr( productTemplate.data.response.docs[0], diff --git a/src/pages/shop/product/[slug].jsx b/src/pages/shop/product/[slug].jsx index 7351da2f..63fb2e7e 100644 --- a/src/pages/shop/product/[slug].jsx +++ b/src/pages/shop/product/[slug].jsx @@ -18,7 +18,7 @@ export async function getServerSideProps(context) { const cookies = context.req.headers.cookie const cookieObj = cookies ? cookie.parse(cookies) : {} const auth = cookieObj.auth ? JSON.parse(cookieObj.auth) : {} - const tier = auth.pricelist + const tier = auth.pricelist ? auth.pricelist : false const authToken = auth?.token || '' let response = await axios( |
