diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-10-11 14:07:58 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-10-11 14:07:58 +0700 |
| commit | cff358b2a7bb310e2b65cba5d843e9ffdda0f699 (patch) | |
| tree | 78ecfc988c86d0491806b94f47a22c00675dcb6b /src/pages/shop/product | |
| parent | f1d9a308f61e67f4c896608e73ac8413f61fa8af (diff) | |
Fix description and brand banner skeleton
Diffstat (limited to 'src/pages/shop/product')
| -rw-r--r-- | src/pages/shop/product/[slug].jsx | 7 |
1 files changed, 1 insertions, 6 deletions
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() |
