diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2024-07-29 01:52:33 +0000 |
|---|---|---|
| committer | trisusilo <tri.susilo@altama.co.id> | 2024-07-29 01:52:33 +0000 |
| commit | 0ababbb77b101a57148be2d88ae2ea70fd584b25 (patch) | |
| tree | 7c567ce269c1459ecc607c0d1d2ae74163b473f7 /src/pages/shop | |
| parent | 4e794d5df6574084ab3faa5282cb8622fa40c3ab (diff) | |
| parent | 489901470f9027ab5dede4d03796aeaf85ce9a7e (diff) | |
Merged in bug-delete-refco (pull request #178)
<iman> update refco page search
Approved-by: trisusilo
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 1e48e781..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,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 |
