diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-04-11 11:06:38 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-04-11 11:06:38 +0700 |
| commit | 3df233e0c23e7d4503931ab6ec8ffc41642ac104 (patch) | |
| tree | ccc032defe422f5fafc4a08af672833b2fe41835 /src/lib/auth/components/PersonalProfile.jsx | |
| parent | 006c77a85786c24199db157d1d70f48b47311d35 (diff) | |
| parent | f0a720441def88187b3913268238c379362fb9d3 (diff) | |
Merge branch 'master' into development_tri/feedback_UAT
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> |
