diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-10-31 10:46:08 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-10-31 10:46:08 +0700 |
| commit | c8c7690c49958c1f8ff0756eda407d7276c536cb (patch) | |
| tree | f82c08a3dba1c4ed215cd41d399e561e786f377a /src-migrate/modules/account-activation/components/FormOTP.tsx | |
| parent | 4ad0c430519f3dfc38ec4a6a3fae6b40ba2c5f71 (diff) | |
| parent | 6b221cccd58710682c99db7afbc29322da042880 (diff) | |
Merge branch 'refactor/all' into development
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> |
