team.tsx27 lines · main
| 1 | import { LogoLoader } from 'ui' |
| 2 | |
| 3 | import { TeamSettings } from '@/components/interfaces/Organization/TeamSettings/TeamSettings' |
| 4 | import DefaultLayout from '@/components/layouts/DefaultLayout' |
| 5 | import OrganizationLayout from '@/components/layouts/OrganizationLayout' |
| 6 | import { usePermissionsQuery } from '@/data/permissions/permissions-query' |
| 7 | import { useSelectedOrganizationQuery } from '@/hooks/misc/useSelectedOrganization' |
| 8 | import type { NextPageWithLayout } from '@/types' |
| 9 | |
| 10 | const OrgTeamSettings: NextPageWithLayout = () => { |
| 11 | const { isPending: isLoadingPermissions } = usePermissionsQuery() |
| 12 | const { data: selectedOrganization } = useSelectedOrganizationQuery() |
| 13 | |
| 14 | return selectedOrganization === undefined && isLoadingPermissions ? ( |
| 15 | <LogoLoader /> |
| 16 | ) : ( |
| 17 | <TeamSettings /> |
| 18 | ) |
| 19 | } |
| 20 | |
| 21 | OrgTeamSettings.getLayout = (page) => ( |
| 22 | <DefaultLayout> |
| 23 | <OrganizationLayout title="Team">{page}</OrganizationLayout> |
| 24 | </DefaultLayout> |
| 25 | ) |
| 26 | |
| 27 | export default OrgTeamSettings |