From 70d7b4cfad767be2d066cc66cf13b3e06e860f73 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Thu, 23 Feb 2023 11:22:45 +0700
Subject: fix

---
 src/pages/my/profile.jsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'src/pages/my/profile.jsx')

diff --git a/src/pages/my/profile.jsx b/src/pages/my/profile.jsx
index f8d4c3de..85361f1e 100644
--- a/src/pages/my/profile.jsx
+++ b/src/pages/my/profile.jsx
@@ -1,14 +1,16 @@
 import Divider from '@/core/components/elements/Divider/Divider'
 import AppLayout from '@/core/components/layouts/AppLayout'
+import useAuth from '@/core/hooks/useAuth'
 import CompanyProfile from '@/lib/auth/components/CompanyProfile'
 import PersonalProfile from '@/lib/auth/components/PersonalProfile'
 
 export default function Profile() {
+  const auth = useAuth()
   return (
     <AppLayout title='Akun Saya'>
       <PersonalProfile />
       <Divider />
-      <CompanyProfile />
+      { auth?.parentId && <CompanyProfile />}
     </AppLayout>
   )
 }
-- 
cgit v1.2.3

