From a5c8e89076f73389f0a9bef3a941553a7d6d9f01 Mon Sep 17 00:00:00 2001 From: trisusilo48 Date: Thu, 25 Jul 2024 08:54:44 +0700 Subject: CR - Title page brand detail --- src/pages/shop/brands/[slug].jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pages') diff --git a/src/pages/shop/brands/[slug].jsx b/src/pages/shop/brands/[slug].jsx index c3a7299f..1e48e781 100644 --- a/src/pages/shop/brands/[slug].jsx +++ b/src/pages/shop/brands/[slug].jsx @@ -20,7 +20,7 @@ export default function BrandDetail() { return ( Date: Sat, 27 Jul 2024 08:43:01 +0700 Subject: update refco page search --- src/pages/shop/brands/[slug].jsx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/pages') diff --git a/src/pages/shop/brands/[slug].jsx b/src/pages/shop/brands/[slug].jsx index c3a7299f..7c5aa699 100644 --- a/src/pages/shop/brands/[slug].jsx +++ b/src/pages/shop/brands/[slug].jsx @@ -5,6 +5,7 @@ import _ from 'lodash' import Seo from '@/core/components/Seo' import Breadcrumb from '@/lib/brand/components/Breadcrumb' import useBrand from '@/lib/brand/hooks/useBrand' +import PageNotFound from '@/pages/404'; const BasicLayout = dynamic(() => import('@/core/components/layouts/BasicLayout')) const ProductSearch = dynamic(() => import('@/lib/product/components/ProductSearch')) @@ -17,6 +18,9 @@ export default function BrandDetail() { const brandName = getNameFromSlug(slug) const id = getIdFromSlug(slug) const {brand} = useBrand({id}) + if (!brand || !brand.data || _.isEmpty(brand.data)) { + return ; + } return ( Date: Fri, 2 Aug 2024 08:58:03 +0700 Subject: delete console log --- .../my/recomendation/components/products-recomendatison.jsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/pages') diff --git a/src/pages/my/recomendation/components/products-recomendatison.jsx b/src/pages/my/recomendation/components/products-recomendatison.jsx index d39d2a99..7da2fab1 100644 --- a/src/pages/my/recomendation/components/products-recomendatison.jsx +++ b/src/pages/my/recomendation/components/products-recomendatison.jsx @@ -80,7 +80,7 @@ const ProductsRecomendation = ({ id }) => { } }); - console.log('ini result', searchProduct.data.response); + // console.log('ini result', searchProduct.data.response); } return resultMapping; @@ -112,7 +112,7 @@ const ProductsRecomendation = ({ id }) => { setIsLoading(false); } else { setIsLoading(false); - console.log('No excel data available'); + // console.log('No excel data available'); } }; @@ -129,7 +129,7 @@ const ProductsRecomendation = ({ id }) => { const jsonData = XLSX.utils.sheet_to_json(worksheet); setExcelData(jsonData); - console.log('ini json data', jsonData); + // console.log('ini json data', jsonData); setIsLoading(false); }; @@ -146,13 +146,13 @@ const ProductsRecomendation = ({ id }) => { products[foundIndex].result.code = variant?.code; products[foundIndex].result.name = variant?.name; } else { - console.log('Data not found.'); + // console.log('Data not found.'); } setIsOpen(false); }; const handlingOtherRec = ({ product }) => { - console.log('ini product', product); + // console.log('ini product', product); const result = async () => await searchRecomendation({ product, index: 0, operator: 'OR' }); -- cgit v1.2.3