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