From 7dd2b66958fbe63c1fa68a9c3fb5eab7ee389342 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Tue, 4 Feb 2025 17:02:17 +0700 Subject: munculin company profile --- src/lib/auth/components/CompanyProfile.jsx | 2 +- src/pages/my/profile.jsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/auth/components/CompanyProfile.jsx b/src/lib/auth/components/CompanyProfile.jsx index 410d6a23..47f2f1a1 100644 --- a/src/lib/auth/components/CompanyProfile.jsx +++ b/src/lib/auth/components/CompanyProfile.jsx @@ -59,7 +59,7 @@ const CompanyProfile = () => { useEffect(() => { const loadProfile = async () => { const dataProfile = await addressApi({ - id: auth.parentId ? auth.parentId : auth.parent_id, + id: auth?.company ? auth.partnerId : auth.parentId, }); setCompany_type(dataProfile?.companyType); setValue('name', dataProfile?.name); diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx index 54e9024a..859b6960 100644 --- a/src/pages/my/profile.jsx +++ b/src/pages/my/profile.jsx @@ -98,7 +98,7 @@ export default function Profile() { )} */} - {auth?.parentId && } + {(auth?.parentId || auth?.company) && } @@ -136,7 +136,7 @@ export default function Profile() { )} */} - {auth?.parentId && } + {(auth?.parentId || auth?.company) && } -- cgit v1.2.3