diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2024-08-02 03:25:54 +0000 |
|---|---|---|
| committer | trisusilo <tri.susilo@altama.co.id> | 2024-08-02 03:25:54 +0000 |
| commit | 99a5965e1e5320e9acbc9718c3642ffae85bec57 (patch) | |
| tree | 6a9aeca9b6833d7b87d0ea0a3d79d6bd15862751 /src-migrate/modules/footer-banner | |
| parent | 12c7841770052aefceda899db52b3e6b6d0b5e92 (diff) | |
| parent | 35204954ac02efd1497715dec3d2695fdd7976f8 (diff) | |
Merged in Feature/all-promotion (pull request #202)
Feature/all promotion
Approved-by: trisusilo
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; |
