diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-07-10 16:23:35 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-07-10 16:23:35 +0700 |
| commit | a8dcd4d3d14d9caf64063f3ec586125238727794 (patch) | |
| tree | 943ad4a0bcd25153ace381075f95ab0aec4a2edf /src-migrate/modules/footer-banner | |
| parent | 2e3c726bc8217f3960cfecec44b81303b03de72b (diff) | |
| parent | ffaf9994e8c47c5a32a2091b7d0949302528ee2e (diff) | |
Merge branch 'feature/all-promotion' into development
Diffstat (limited to 'src-migrate/modules/footer-banner')
| -rw-r--r-- | src-migrate/modules/footer-banner/index.tsx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src-migrate/modules/footer-banner/index.tsx b/src-migrate/modules/footer-banner/index.tsx index b214493d..86321815 100644 --- a/src-migrate/modules/footer-banner/index.tsx +++ b/src-migrate/modules/footer-banner/index.tsx @@ -10,7 +10,7 @@ const FooterBanner = () => { queryKey: 'footerBanner', queryFn: () => getBanner({ type: 'bottom-search-promotion' }) }) - // ubah dari static menjadid dynamic dengan menggunakan random index + const length = useMemo(() => fetchFooterBanner.data?.length, [fetchFooterBanner.data]); const randomIndex = useMemo(() => getRandomInt(length), [length]); const banner = fetchFooterBanner?.data?.[randomIndex] || false; |
