diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/pages/shop/product/variant/[slug].jsx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/pages/shop/product/variant/[slug].jsx b/src/pages/shop/product/variant/[slug].jsx index 455b248b..401bce82 100644 --- a/src/pages/shop/product/variant/[slug].jsx +++ b/src/pages/shop/product/variant/[slug].jsx @@ -21,16 +21,18 @@ export async function getServerSideProps(context) { const tier = auth.pricelist ? auth.pricelist : false const authToken = auth?.token || '' - let response = await axios( - `${process.env.NEXT_PUBLIC_SELF_HOST}/api/shop/variant-detail?id=` + getIdFromSlug(slug) +'&auth=' + tier + `${process.env.NEXT_PUBLIC_SELF_HOST}/api/shop/variant-detail?id=` + + getIdFromSlug(slug) + + '&auth=' + + 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 regexHtmlTags = /(<([^>]+)>)/gi const regexHtmlTagsExceptP = /<\/?(?!p\b)[^>]*>/g product.description = product.description .replace(regexHtmlTagsExceptP, ' ') |
