summaryrefslogtreecommitdiff
path: root/src/pages
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2024-08-02 10:16:46 +0000
committerIT Fixcomart <it@fixcomart.co.id>2024-08-02 10:16:46 +0000
commitd8510399c21b2cf4bf606441397a0142bc265a94 (patch)
tree75543baf82a73fb7e8dea6c8a1c353e02c57bbcd /src/pages
parent6a2c25e83a45eeb5d613a99a0caa6f0ec1aae15f (diff)
parent55c9f5e1fb868c85e704529ac914b3d75fc7744e (diff)
Merged in Feature/new-cart-popup (pull request #208)
Feature/new cart popup
Diffstat (limited to 'src/pages')
-rw-r--r--src/pages/my/recomendation/components/products-recomendatison.jsx10
-rw-r--r--src/pages/shop/brands/[slug].jsx6
2 files changed, 10 insertions, 6 deletions
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' });
diff --git a/src/pages/shop/brands/[slug].jsx b/src/pages/shop/brands/[slug].jsx
index c3a7299f..e786ef78 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,10 +18,13 @@ export default function BrandDetail() {
const brandName = getNameFromSlug(slug)
const id = getIdFromSlug(slug)
const {brand} = useBrand({id})
+ if (!brand || !brand.data || _.isEmpty(brand.data)) {
+ return <PageNotFound />;
+ }
return (
<BasicLayout>
<Seo
- title={`Distributor ${brandName} Indonesia Harga Official Indoteknik.com`}
+ title={`Jual Produk Resmi ${brandName} Indonesia | Indoteknik.com`}
description='B2B Marketplace MRO &amp; Industri dengan Layanan Pembayaran Tempo, Faktur Pajak, Online Quotation, Garansi Resmi &amp; Harga Kompetitif'
additionalMetaTags={[
{