diff options
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/api/shop/variant-detail.js | 2 | ||||
| -rw-r--r-- | src/pages/shop/product/variant/[slug].jsx | 7 |
2 files changed, 1 insertions, 8 deletions
diff --git a/src/pages/api/shop/variant-detail.js b/src/pages/api/shop/variant-detail.js index 08ce75b8..160ec979 100644 --- a/src/pages/api/shop/variant-detail.js +++ b/src/pages/api/shop/variant-detail.js @@ -1,4 +1,4 @@ -import { productMappingSolr, variantsMappingSolr } from '@/utils/solrMapping' +import { variantsMappingSolr } from '@/utils/solrMapping' import axios from 'axios' export default async function handler(req, res) { diff --git a/src/pages/shop/product/variant/[slug].jsx b/src/pages/shop/product/variant/[slug].jsx index 42f38774..2c0dd64b 100644 --- a/src/pages/shop/product/variant/[slug].jsx +++ b/src/pages/shop/product/variant/[slug].jsx @@ -32,16 +32,9 @@ export async function getServerSideProps(context) { tier ); let product = response.data; - // let product = await variantApi({ id: getIdFromSlug(slug), headers: { Token: authToken } }) if (product?.length == 1) { product = product[0]; - /* const regexHtmlTags = /(<([^>]+)>)/gi - const regexHtmlTagsExceptP = /<\/?(?!p\b)[^>]*>/g - product.description = product.description - .replace(regexHtmlTagsExceptP, ' ') - .replace(regexHtmlTags, ' ') - .trim()*/ } else { product = null; } |
