general.tsx53 lines · main
| 1 | import { LogoLoader } from 'ui' |
| 2 | import { PageContainer } from 'ui-patterns/PageContainer' |
| 3 | import { |
| 4 | PageHeader, |
| 5 | PageHeaderDescription, |
| 6 | PageHeaderMeta, |
| 7 | PageHeaderSummary, |
| 8 | PageHeaderTitle, |
| 9 | } from 'ui-patterns/PageHeader' |
| 10 | |
| 11 | import { GeneralSettings } from '@/components/interfaces/Organization/GeneralSettings/GeneralSettings' |
| 12 | import DefaultLayout from '@/components/layouts/DefaultLayout' |
| 13 | import OrganizationLayout from '@/components/layouts/OrganizationLayout' |
| 14 | import { OrganizationSettingsLayout } from '@/components/layouts/ProjectLayout/OrganizationSettingsLayout' |
| 15 | import { usePermissionsQuery } from '@/data/permissions/permissions-query' |
| 16 | import { useSelectedOrganizationQuery } from '@/hooks/misc/useSelectedOrganization' |
| 17 | import type { NextPageWithLayout } from '@/types' |
| 18 | |
| 19 | const OrgGeneralSettings: NextPageWithLayout = () => { |
| 20 | const { isPending: isLoadingPermissions } = usePermissionsQuery() |
| 21 | const { data: selectedOrganization } = useSelectedOrganizationQuery() |
| 22 | |
| 23 | return ( |
| 24 | <> |
| 25 | <PageHeader size="default"> |
| 26 | <PageHeaderMeta> |
| 27 | <PageHeaderSummary> |
| 28 | <PageHeaderTitle>Organization Settings</PageHeaderTitle> |
| 29 | <PageHeaderDescription> |
| 30 | General configuration, privacy, and lifecycle controls |
| 31 | </PageHeaderDescription> |
| 32 | </PageHeaderSummary> |
| 33 | </PageHeaderMeta> |
| 34 | </PageHeader> |
| 35 | <PageContainer size="default"> |
| 36 | {selectedOrganization === undefined && isLoadingPermissions ? ( |
| 37 | <LogoLoader /> |
| 38 | ) : ( |
| 39 | <GeneralSettings /> |
| 40 | )} |
| 41 | </PageContainer> |
| 42 | </> |
| 43 | ) |
| 44 | } |
| 45 | |
| 46 | OrgGeneralSettings.getLayout = (page) => ( |
| 47 | <DefaultLayout> |
| 48 | <OrganizationLayout title="General"> |
| 49 | <OrganizationSettingsLayout>{page}</OrganizationSettingsLayout> |
| 50 | </OrganizationLayout> |
| 51 | </DefaultLayout> |
| 52 | ) |
| 53 | export default OrgGeneralSettings |