diff options
Diffstat (limited to 'src/lib/auth/components/PersonalProfile.jsx')
| -rw-r--r-- | src/lib/auth/components/PersonalProfile.jsx | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/src/lib/auth/components/PersonalProfile.jsx b/src/lib/auth/components/PersonalProfile.jsx index 0b387f2e..4a533ae9 100644 --- a/src/lib/auth/components/PersonalProfile.jsx +++ b/src/lib/auth/components/PersonalProfile.jsx @@ -34,7 +34,7 @@ const PersonalProfile = () => { let data = values if (!values.password) delete data.password const isUpdated = await editPersonalProfileApi({ data }) - console.log(isUpdated) + if (isUpdated?.user) { setAuth(isUpdated.user) setValue('password', '') @@ -47,11 +47,7 @@ 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'> <div> <div className='font-semibold mb-2'>Informasi Akun</div> <div className='text-gray_r-11'> @@ -71,28 +67,15 @@ const PersonalProfile = () => { > <div> <label>Email</label> - <input - {...register('email')} - type='text' - disabled - className='form-input mt-3' - /> + <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' - /> + <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' - /> + <input {...register('mobile')} type='tel' className='form-input mt-3' /> </div> <div> <label>Kata Sandi</label> @@ -103,10 +86,7 @@ const PersonalProfile = () => { 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 mt-2'> Simpan </button> </form> |
