diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-07-27 08:43:01 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-07-27 08:43:01 +0700 |
| commit | 489901470f9027ab5dede4d03796aeaf85ce9a7e (patch) | |
| tree | baefab41da2d06943b4edc5998d1504c18604570 /src/pages/shop | |
| parent | d0f97021c611d07944f3cbc7e2610b1d495d897f (diff) | |
<iman> update refco page search
Diffstat (limited to 'src/pages/shop')
| -rw-r--r-- | src/pages/shop/brands/[slug].jsx | 4 |
1 files changed, 4 insertions, 0 deletions
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 <PageNotFound />; + } return ( <BasicLayout> <Seo |
