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 IsAuth from '@/lib/auth/components/IsAuth'
import PersonalProfile from '@/lib/auth/components/PersonalProfile'

export default function Profile() {
  const auth = useAuth()
  return (
    <IsAuth>
      <AppLayout title='Akun Saya'>
        <PersonalProfile />
        <Divider />
        {auth?.parentId && <CompanyProfile />}
      </AppLayout>
    </IsAuth>
  )
}
