From ab0782b5cf7b65930b0b40528b9205f3f0dfc3a0 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Thu, 12 Sep 2024 10:11:02 +0700
Subject: <iman> update switch account

---
 src/lib/auth/components/PersonalProfile.jsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(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 7ef3af2d..727785bf 100644
--- a/src/lib/auth/components/PersonalProfile.jsx
+++ b/src/lib/auth/components/PersonalProfile.jsx
@@ -22,7 +22,9 @@ const PersonalProfile = () => {
 
   useEffect(() => {
     const loadProfile = async () => {
-      const dataProfile = await addressApi({ id: auth.partner_id });
+      const dataProfile = await addressApi({
+        id: auth.partnerId ? auth.partnerId : auth.partner_id,
+      });
       setValue('email', dataProfile?.email);
       setValue('name', dataProfile?.name);
       setValue('mobile', dataProfile?.mobile);
-- 
cgit v1.2.3

