summaryrefslogtreecommitdiff
path: root/src/pages
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages')
-rw-r--r--src/pages/my/profile.jsx8
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'