From df5d4208209d0d4a92ecf1183dfd8a83ec35383f Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Fri, 21 Feb 2025 14:34:06 +0700 Subject: update code /my/tempo --- src/pages/my/tempo/index.jsx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/pages/my/tempo/index.jsx b/src/pages/my/tempo/index.jsx index 5fb9deba..0c6fc0fb 100644 --- a/src/pages/my/tempo/index.jsx +++ b/src/pages/my/tempo/index.jsx @@ -16,14 +16,11 @@ export default function MyTempo() { if (!auth) { const nextUrl = encodeURIComponent(router.asPath); router.push(`/login?next=${nextUrl}`); - } - // else if ( - // (auth.tempoProgres === '' || auth.tempoProgres === 'rejected') && - // !auth.company - // ) { - // router.push('/pengajuan-tempo'); - // } - else { + } else { + if ( !auth.partnerTempo && (!auth.partnerTempo || auth.tempoProgres === 'review') ) { + router.push('/pengajuan-tempo'); + } + setIsLoading(false); } }, [auth]); -- cgit v1.2.3