From 77184327fd3490dd822d60b97f37052f3feec186 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Tue, 18 Feb 2025 10:16:02 +0700 Subject: bug profile get company --- src/lib/auth/components/CompanyProfile.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/auth/components/CompanyProfile.jsx b/src/lib/auth/components/CompanyProfile.jsx index c6ba1a81..6d4da1d1 100644 --- a/src/lib/auth/components/CompanyProfile.jsx +++ b/src/lib/auth/components/CompanyProfile.jsx @@ -59,9 +59,8 @@ const CompanyProfile = () => { useEffect(() => { const loadProfile = async () => { const dataProfile = await addressApi({ - id: auth?.company ? auth.parentId : auth.partnerId, + id: auth?.company ? (auth.parentId ? auth.parentId : auth.partnerId) : auth.partnerId, }); - setCompany_type(dataProfile?.companyType); setValue('name', dataProfile?.name); setValue('industry', dataProfile?.industryId); -- cgit v1.2.3