diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-12-02 09:31:44 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-12-02 09:31:44 +0700 |
| commit | 77f9843ad5072583cb1797d7ecf5ac80394bad3f (patch) | |
| tree | 61d25d17d7c1a090112f673fabc96dd8ffceb79a /src/lib/auth | |
| parent | ac83b0ea5afd82194f38fbc913678e16a81b5c2c (diff) | |
<iman> pengajuan tempo
Diffstat (limited to 'src/lib/auth')
| -rw-r--r-- | src/lib/auth/components/Menu.jsx | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/lib/auth/components/Menu.jsx b/src/lib/auth/components/Menu.jsx index 18d8df91..466b793e 100644 --- a/src/lib/auth/components/Menu.jsx +++ b/src/lib/auth/components/Menu.jsx @@ -3,8 +3,10 @@ import { useRouter } from 'next/router'; import ImageNext from 'next/image'; import whatsappUrl from '@/core/utils/whatsappUrl'; import { deleteAuth } from '@/core/utils/auth'; +import useAuth from '@/core/hooks/useAuth'; const Menu = () => { const router = useRouter(); + const auth = useAuth(); const routeStartWith = (route) => router.pathname.startsWith(route); @@ -60,12 +62,19 @@ const Menu = () => { <p>Invoice & Faktur Pajak</p> </div> </LinkItem> - <LinkItem href='/my/tempo' active={routeStartWith('/my/tempo')}> - <div className='flex gap-x-3 items-center'> - <ImageNext src='/images/icon/icon_tempo.svg' width={18} height={20} /> - <p>Pembayaran Tempo</p> - </div> - </LinkItem> + {(atuh?.partnerTempo.toLowerCase().includes('tempo') || + atuh.tempoProgres == 'review') && ( + <LinkItem href='/my/tempo' active={routeStartWith('/my/tempo')}> + <div className='flex gap-x-3 items-center'> + <ImageNext + src='/images/icon/icon_tempo.svg' + width={18} + height={20} + /> + <p>Pembayaran Tempo</p> + </div> + </LinkItem> + )} <LinkItem href='/my/wishlist' active={routeStartWith('/my/wishlist')}> <div className='flex gap-x-3 items-center'> <ImageNext |
