summaryrefslogtreecommitdiff
path: root/src/lib/auth/components/Activate.jsx
diff options
context:
space:
mode:
authorHATEC\SPVDEV001 <tri.susilo@altama.co.id>2023-04-11 11:06:38 +0700
committerHATEC\SPVDEV001 <tri.susilo@altama.co.id>2023-04-11 11:06:38 +0700
commit3df233e0c23e7d4503931ab6ec8ffc41642ac104 (patch)
treeccc032defe422f5fafc4a08af672833b2fe41835 /src/lib/auth/components/Activate.jsx
parent006c77a85786c24199db157d1d70f48b47311d35 (diff)
parentf0a720441def88187b3913268238c379362fb9d3 (diff)
Merge branch 'master' into development_tri/feedback_UAT
Diffstat (limited to 'src/lib/auth/components/Activate.jsx')
-rw-r--r--src/lib/auth/components/Activate.jsx52
1 files changed, 14 insertions, 38 deletions
diff --git a/src/lib/auth/components/Activate.jsx b/src/lib/auth/components/Activate.jsx
index 717e178b..c81bcbbd 100644
--- a/src/lib/auth/components/Activate.jsx
+++ b/src/lib/auth/components/Activate.jsx
@@ -27,10 +27,7 @@ const Activate = () => {
children: (
<>
Selamat, akun anda berhasil diaktifkan,{' '}
- <Link
- className='text-gray_r-12'
- href='/'
- >
+ <Link className='text-gray_r-12' href='/'>
kembali ke beranda
</Link>
.
@@ -43,10 +40,7 @@ const Activate = () => {
children: (
<>
Mohon maaf token sudah tidak aktif, lakukan permintaan aktivasi akun kembali atau{' '}
- <Link
- className='text-gray_r-12'
- href='/login'
- >
+ <Link className='text-gray_r-12' href='/login'>
masuk
</Link>{' '}
jika sudah memiliki akun.
@@ -67,9 +61,12 @@ const Activate = () => {
const activationRequest = async (e) => {
e.preventDefault()
setIsLoading(true)
- let activationRequest = await axios.post(`${process.env.NEXT_PUBLIC_SELF_HOST}/api/activation-request`, {
- email
- })
+ let activationRequest = await axios.post(
+ `${process.env.NEXT_PUBLIC_SELF_HOST}/api/activation-request`,
+ {
+ email
+ }
+ )
if (activationRequest.data.activationRequest) {
setAlert({
children: <>Mohon cek email anda untuk aktivasi akun Indoteknik</>,
@@ -82,10 +79,7 @@ const Activate = () => {
children: (
<>
Email tersebut belum terdaftar,{' '}
- <Link
- className='text-gray_r-12'
- href='/register'
- >
+ <Link className='text-gray_r-12' href='/register'>
daftar sekarang
</Link>
.
@@ -99,10 +93,7 @@ const Activate = () => {
children: (
<>
Email tersebut sudah terdaftar dan sudah aktif,{' '}
- <Link
- className='text-gray_r-12'
- href='/login'
- >
+ <Link className='text-gray_r-12' href='/login'>
masuk sekarang
</Link>
.
@@ -119,29 +110,18 @@ const Activate = () => {
return (
<div className='p-6 pt-10 flex flex-col items-center min-h-screen'>
<Link href='/'>
- <Image
- src={IndoteknikLogo}
- alt='Logo Indoteknik'
- width={150}
- height={50}
- />
+ <Image src={IndoteknikLogo} alt='Logo Indoteknik' width={150} height={50} />
</Link>
<h1 className='text-2xl mt-4 font-semibold text-center'>Aktivasi Akun Indoteknik</h1>
{alert && (
- <Alert
- className='text-center mt-4'
- type={alert.type}
- >
+ <Alert className='text-center mt-4' type={alert.type}>
{alert.children}
</Alert>
)}
- <form
- onSubmit={activationRequest}
- className='mt-6 w-full'
- >
+ <form onSubmit={activationRequest} className='mt-6 w-full'>
<input
type='email'
id='email'
@@ -151,11 +131,7 @@ const Activate = () => {
placeholder='Masukan alamat email'
autoFocus
/>
- <button
- type='submit'
- disabled={!email}
- className='btn-yellow font-semibold mt-4 w-full'
- >
+ <button type='submit' disabled={!email} className='btn-yellow font-semibold mt-4 w-full'>
{isLoading ? 'Loading...' : 'Aktivasi'}
</button>
</form>