diff options
| author | Indoteknik . <andrifebriyadiputra@gmail.com> | 2025-08-15 13:58:59 +0700 |
|---|---|---|
| committer | Indoteknik . <andrifebriyadiputra@gmail.com> | 2025-08-15 13:58:59 +0700 |
| commit | b1bdfbb9f780a1a1305e02c4b9c338b98c7a4556 (patch) | |
| tree | 720aa9eeb0ec98a559f6a1653533185479590cc8 /src/pages/my | |
| parent | 1085602ad84e73692e3ab8b9141c5f61381a8cea (diff) | |
(andri) fix switch account
Diffstat (limited to 'src/pages/my')
| -rw-r--r-- | src/pages/my/profile.jsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx index 887489e0..b65a5e4d 100644 --- a/src/pages/my/profile.jsx +++ b/src/pages/my/profile.jsx @@ -18,6 +18,7 @@ import { useRouter } from 'next/router'; export default function Profile() { const auth = useAuth(); + console.log('auth', auth); const [isChecked, setIsChecked] = useState(false); const [ubahAkun, setUbahAkun] = useState(false); const [isAprove, setIsAprove] = useState(); @@ -111,9 +112,9 @@ export default function Profile() { <p className="ml-2">Ubah ke akun bisnis</p> </div> ))} - {isChecked && ( + {isChecked && ubahAkun !== 'pending' && ( <div> - <SwitchAccount company_type="nonpkp" /> + <SwitchAccount company_type="nonpkp" setIsAprove={setIsAprove} setUbahAkun={setUbahAkun}/> <Divider /> </div> )} @@ -148,9 +149,9 @@ export default function Profile() { <p className="ml-2">Ubah ke akun bisnis</p> </div> ))} - {isChecked && ( + {isChecked && ubahAkun !== 'pending' && ( <div> - <SwitchAccount company_type="nonpkp" /> + <SwitchAccount company_type="nonpkp" setIsAprove={setIsAprove} setUbahAkun={setUbahAkun}/> <Divider /> </div> )} |
