diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-09-02 16:43:25 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-09-02 16:43:25 +0700 |
| commit | b30e6a53d660f9ccbc0ded640c2a1dc5df673ff2 (patch) | |
| tree | ae840e06b29d9ccdeb88c31b17d1962ebd9f5539 /src/pages/shop | |
| parent | 3f384749fe51a2763e7e99351f36ce70954afb7a (diff) | |
<iman> update fetch data
Diffstat (limited to 'src/pages/shop')
| -rw-r--r-- | src/pages/shop/promo/[slug].jsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pages/shop/promo/[slug].jsx b/src/pages/shop/promo/[slug].jsx index 544286f9..ce73ebd1 100644 --- a/src/pages/shop/promo/[slug].jsx +++ b/src/pages/shop/promo/[slug].jsx @@ -24,7 +24,7 @@ import whatsappUrl from '../../../core/utils/whatsappUrl.js'; import { cons, toQuery } from 'lodash-contrib'; import _ from 'lodash'; import useActive from '../../../core/hooks/useActive.js'; -import useProductSearch from '../../../lib/product/hooks/useProductSearch.js'; +import useProductSearch from '../../../lib/promo/hooks/usePromotionSearch.js'; const BasicLayout = dynamic(() => import('../../../core/components/layouts/BasicLayout.jsx')) @@ -45,7 +45,7 @@ export default function PromoDetail() { const popup = useActive(); const prefixUrl = `/shop/promo/${slug}` const [queryFinal, setQueryFinal] = useState({}); - const [limit, setLimit] = useState<number>(30); + const [limit, setLimit] = useState(30); const [q, setQ] = useState('*'); const [finalQuery, setFinalQuery] = useState({fq: `type_value_s:${slug}`}); const [products, setProducts] = useState(null); @@ -365,7 +365,7 @@ export default function PromoDetail() { ) : promoData && promoItems.length >= 1 ? ( <> <div className='grid grid-cols-1 gap-x-1 gap-y-1'> - {visiblePromotions?.map((promotion) => ( + {products?.map((promotion) => ( <div key={promotion.id} className="min-w-36 max-w-[400px] mb-[20px] sm:w-full md:w-1/2 lg:w-1/3 xl:w-1/4 "> <ProductPromoCard promotion={promotion}/> </div> |
