diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-10-01 10:57:08 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-10-01 10:57:08 +0700 |
| commit | 2dc7f7ae3eb62f9821f8ae1fb87db2e7b9234e1b (patch) | |
| tree | 845713b3aeadfb224036cb03762b4079edb63b8e /src/pages | |
| parent | ed679c9b8ea85e8f181cf67465effc4b5ff1a7bc (diff) | |
<iman> update logic switch account
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/my/profile.jsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx index ee0cd907..f44a44f3 100644 --- a/src/pages/my/profile.jsx +++ b/src/pages/my/profile.jsx @@ -18,7 +18,7 @@ export default function Profile() { const auth = useAuth(); const [isChecked, setIsChecked] = useState(false); const [ubahAkun, setUbahAkun] = useState(false); - const [isAprove, setIsAprove] = useState('unknown'); + const [isAprove, setIsAprove] = useState(); const [changeConfirmation, setChangeConfirmation] = useState(false); const handleChange = async () => { if (isChecked) { @@ -32,7 +32,7 @@ export default function Profile() { const progresSwitchAccount = await switchAccountProgresApi(); if (progresSwitchAccount) { setIsAprove(progresSwitchAccount.status); - setUbahAkun(progresSwitchAccount.status === 'unknown'); + setUbahAkun(progresSwitchAccount.status); } }; loadPromo(); @@ -71,7 +71,7 @@ export default function Profile() { <IsAuth> <MobileView> <AppLayout title='Akun Saya'> - {!auth?.parentId && ubahAkun && ( + {!auth?.parentId && !ubahAkun && ( <div className='text-sm p-4 flex items-center'> <Checkbox borderColor='gray.600' @@ -108,7 +108,7 @@ export default function Profile() { <Menu /> </div> <div className='w-9/12 bg-white border border-gray_r-6 rounded'> - {!auth?.parentId && ubahAkun && ( + {!auth?.parentId && !ubahAkun && ( <div className='text-sm p-4 flex items-center'> <Checkbox borderColor='gray.600' |
