From 92c2a229d9c9b510d71b928978872a8b107e9d5a Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Tue, 11 Apr 2023 09:47:25 +0700
Subject: Documentation and refactor code

---
 src/lib/auth/components/PersonalProfile.jsx | 32 ++++++-----------------------
 1 file changed, 6 insertions(+), 26 deletions(-)

(limited to 'src/lib/auth/components/PersonalProfile.jsx')

diff --git a/src/lib/auth/components/PersonalProfile.jsx b/src/lib/auth/components/PersonalProfile.jsx
index 4f606ed4..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 })
-    
+
     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>
-- 
cgit v1.2.3

