diff options
Diffstat (limited to 'src/lib/auth/components/PersonalProfile.jsx')
| -rw-r--r-- | src/lib/auth/components/PersonalProfile.jsx | 54 |
1 files changed, 26 insertions, 28 deletions
diff --git a/src/lib/auth/components/PersonalProfile.jsx b/src/lib/auth/components/PersonalProfile.jsx index bca54e24..b9fb3f5f 100644 --- a/src/lib/auth/components/PersonalProfile.jsx +++ b/src/lib/auth/components/PersonalProfile.jsx @@ -38,7 +38,6 @@ const PersonalProfile = () => { if (isUpdated?.user) { setAuth(isUpdated.user) setValue('password', '') - setIsOpen(false) toast.success('Berhasil mengubah profil', { duration: 1500 }) return } @@ -47,46 +46,45 @@ const PersonalProfile = () => { return ( <> - <button type='button' onClick={toggle} className='p-4 flex items-center text-left'> + <button type='button' onClick={toggle} className='p-4 flex items-center text-left w-full'> <div> <div className='font-semibold mb-2'>Informasi Akun</div> <div className='text-gray_r-11'> Dibawah ini adalah data diri yang anda masukan, periksa kembali data diri anda </div> </div> - <div className='ml-2 p-2 bg-gray_r-3 rounded'> + <div className='ml-auto p-2 bg-gray_r-3 rounded'> {!isOpen && <ChevronDownIcon className='w-6' />} {isOpen && <ChevronUpIcon className='w-6' />} </div> </button> {isOpen && ( - <form - className='p-4 border-t border-gray_r-6 flex flex-col gap-y-4' - onSubmit={handleSubmit(onSubmitHandler)} - > - <div> - <label>Email</label> - <input {...register('email')} type='text' disabled className='form-input mt-3' /> + <form className='p-4 border-t border-gray_r-6' onSubmit={handleSubmit(onSubmitHandler)}> + <div className='grid grid-cols-1 sm:grid-cols-2 gap-4'> + <div> + <label>Email</label> + <input {...register('email')} type='text' disabled className='form-input mt-3' /> + </div> + <div> + <label>Nama Lengkap</label> + <input {...register('name')} type='text' className='form-input mt-3' /> + </div> + <div> + <label>No. Handphone</label> + <input {...register('mobile')} type='tel' className='form-input mt-3' /> + </div> + <div> + <label>Kata Sandi</label> + <input + {...register('password')} + type='password' + className='form-input mt-3' + placeholder='Isi jika ingin mengubah kata sandi' + /> + </div> </div> - <div> - <label>Nama Lengkap</label> - <input {...register('name')} type='text' className='form-input mt-3' /> - </div> - <div> - <label>No. Handphone</label> - <input {...register('mobile')} type='tel' className='form-input mt-3' /> - </div> - <div> - <label>Kata Sandi</label> - <input - {...register('password')} - type='password' - className='form-input mt-3' - placeholder='Isi jika ingin mengubah kata sandi' - /> - </div> - <button type='submit' className='btn-yellow w-full mt-2'> + <button type='submit' className='btn-yellow w-full sm:w-fit sm:ml-auto mt-6'> Simpan </button> </form> |
