diff options
Diffstat (limited to 'src-migrate/modules/account-activation/components/FormOTP.tsx')
| -rw-r--r-- | src-migrate/modules/account-activation/components/FormOTP.tsx | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src-migrate/modules/account-activation/components/FormOTP.tsx b/src-migrate/modules/account-activation/components/FormOTP.tsx index a4775d61..47c69329 100644 --- a/src-migrate/modules/account-activation/components/FormOTP.tsx +++ b/src-migrate/modules/account-activation/components/FormOTP.tsx @@ -54,8 +54,9 @@ const FormOTP = () => { useEffect(() => { if (mutationActivation.data?.user) { setAuth(mutationActivation.data.user) + router.push((query?.redirect || '/') as string) } - }, [mutationActivation.data]) + }, [mutationActivation.data, router, query.redirect]) return ( <Modal active={active} className="w-10/12 md:w-fit px-10" mode="desktop"> @@ -78,10 +79,6 @@ const FormOTP = () => { <span className="text-red-700">Mohon maaf kode OTP yand anda masukan salah</span> ) } - - {mutationActivation.data?.activation && ( - <span className="text-success-700">Akun anda berhasil diaktifkan, selamat berbelanja di Indoteknik.</span> - )} </div> {!mutationActivation.data?.activation && ( @@ -108,11 +105,6 @@ const FormOTP = () => { </> )} - {mutationActivation.data?.activation && ( - <Link href='/' className="text-success-700 underline">Kembali ke halaman utama</Link> - )} - - </div> </div> </Modal> |
