diff options
Diffstat (limited to 'src/lib/auth')
| -rw-r--r-- | src/lib/auth/components/Login.jsx | 5 | ||||
| -rw-r--r-- | src/lib/auth/components/Register.jsx | 95 |
2 files changed, 98 insertions, 2 deletions
diff --git a/src/lib/auth/components/Login.jsx b/src/lib/auth/components/Login.jsx index 971188a2..92d38c11 100644 --- a/src/lib/auth/components/Login.jsx +++ b/src/lib/auth/components/Login.jsx @@ -93,12 +93,13 @@ const Login = () => { {!isLoading ? 'Masuk' : 'Loading...'} </button> </form> - <p className='text-gray_r-11 mt-4'> + + <div className='text-gray_r-11 mt-4'> Belum punya akun Indoteknik?{' '} <Link href='/register' className='inline'> Daftar </Link> - </p> + </div> </div> ) } diff --git a/src/lib/auth/components/Register.jsx b/src/lib/auth/components/Register.jsx new file mode 100644 index 00000000..4b8a8053 --- /dev/null +++ b/src/lib/auth/components/Register.jsx @@ -0,0 +1,95 @@ +import Image from 'next/image' +import Link from '@/core/components/elements/Link/Link' +import IndoteknikLogo from '@/images/logo.png' +import { useState } from 'react' + +const Register = () => { + const [fullname, setFullname] = useState('') + const [email, setEmail] = useState('') + const [password, setPassword] = useState('') + const [companyName, setCompanyName] = useState('') + const [isLoading, setIsLoading] = useState('') + + const handleSubmit = (e) => { + e.preventDefault() + } + + return ( + <div className='p-6 pt-10 flex flex-col items-center'> + <Link href='/'> + <Image src={IndoteknikLogo} alt='Logo Indoteknik' width={150} height={50} /> + </Link> + + <h1 className='text-2xl mt-4 font-semibold'>Daftar Akun Indoteknik</h1> + <h2 className='text-gray_r-11 font-normal mt-1 mb-4 text-center'> + Buat akun sekarang lebih mudah dan terverifikasi + </h2> + + <form className='w-full mt-6 flex flex-col gap-y-4' onSubmit={handleSubmit}> + <div> + <label htmlFor='companyName'>Nama Perusahaan <span className='text-gray_r-11'>(opsional)</span></label> + <input + type='text' + id='companyName' + className='form-input w-full mt-3' + value={companyName} + onChange={(e) => setCompanyName(e.target.value.toUpperCase())} + placeholder='cth: INDOTEKNIK DOTCOM GEMILANG' + autoCapitalize + /> + </div> + + <div> + <label htmlFor='fullname'>Nama Lengkap</label> + <input + type='text' + id='fullname' + className='form-input w-full mt-3' + value={fullname} + onChange={(e) => setFullname(e.target.value)} + placeholder='John Doe' + /> + </div> + <div> + <label htmlFor='email'>Alamat Email</label> + <input + type='email' + id='email' + className='form-input w-full mt-3' + value={email} + onChange={(e) => setEmail(e.target.value)} + placeholder='contoh@email.com' + /> + </div> + <div> + <label htmlFor='password'>Kata Sandi</label> + <input + type='password' + id='password' + className='form-input w-full mt-3' + value={password} + onChange={(e) => setPassword(e.target.value)} + placeholder='••••••••••••' + /> + </div> + + <button + type='submit' + className='btn-solid-red w-full mt-2' + disabled={!email || !password || isLoading} + > + {!isLoading ? 'Daftar' : 'Loading...'} + </button> + </form> + + <div className='text-gray_r-11 mt-4'> + Sudah punya akun Indoteknik?{' '} + <Link href='/login' className='inline'> + Masuk + </Link> + </div> + </div> + ) +} + +export default Register |
