From cff358b2a7bb310e2b65cba5d843e9ffdda0f699 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Wed, 11 Oct 2023 14:07:58 +0700 Subject: Fix description and brand banner skeleton --- src/pages/shop/product/[slug].jsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/pages') diff --git a/src/pages/shop/product/[slug].jsx b/src/pages/shop/product/[slug].jsx index 63fb2e7e..4c17ab37 100644 --- a/src/pages/shop/product/[slug].jsx +++ b/src/pages/shop/product/[slug].jsx @@ -29,12 +29,6 @@ export async function getServerSideProps(context) { // let productSolr = null 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 } @@ -45,6 +39,7 @@ export async function getServerSideProps(context) { } export default function ProductDetail({ product }) { + console.log(product); const router = useRouter() const { setProduct } = useProductContext() -- cgit v1.2.3