documents.tsx54 lines · main
| 1 | import { useParams } from 'common' |
| 2 | import { |
| 3 | PageHeader, |
| 4 | PageHeaderDescription, |
| 5 | PageHeaderMeta, |
| 6 | PageHeaderSummary, |
| 7 | PageHeaderTitle, |
| 8 | } from 'ui-patterns' |
| 9 | |
| 10 | import { Documents } from '@/components/interfaces/Organization/Documents/Documents' |
| 11 | import { DefaultLayout } from '@/components/layouts/DefaultLayout' |
| 12 | import OrganizationLayout from '@/components/layouts/OrganizationLayout' |
| 13 | import { OrganizationSettingsLayout } from '@/components/layouts/ProjectLayout/OrganizationSettingsLayout' |
| 14 | import { ScaffoldDivider } from '@/components/layouts/Scaffold' |
| 15 | import { UnknownInterface } from '@/components/ui/UnknownInterface' |
| 16 | import { useIsFeatureEnabled } from '@/hooks/misc/useIsFeatureEnabled' |
| 17 | import type { NextPageWithLayout } from '@/types' |
| 18 | |
| 19 | const OrgDocuments: NextPageWithLayout = () => { |
| 20 | const { slug } = useParams() |
| 21 | |
| 22 | const showLegalDocuments = useIsFeatureEnabled('organization:show_legal_documents') |
| 23 | |
| 24 | if (!showLegalDocuments) { |
| 25 | return <UnknownInterface urlBack={`/org/${slug}`} /> |
| 26 | } |
| 27 | |
| 28 | return ( |
| 29 | <> |
| 30 | <PageHeader size="default" className="pb-12"> |
| 31 | <PageHeaderMeta> |
| 32 | <PageHeaderSummary> |
| 33 | <PageHeaderTitle>Legal Documents</PageHeaderTitle> |
| 34 | <PageHeaderDescription> |
| 35 | Compliance documentation and legal agreements |
| 36 | </PageHeaderDescription> |
| 37 | </PageHeaderSummary> |
| 38 | </PageHeaderMeta> |
| 39 | </PageHeader> |
| 40 | <ScaffoldDivider /> |
| 41 | <Documents /> |
| 42 | </> |
| 43 | ) |
| 44 | } |
| 45 | |
| 46 | OrgDocuments.getLayout = (page) => ( |
| 47 | <DefaultLayout> |
| 48 | <OrganizationLayout title="Legal Documents"> |
| 49 | <OrganizationSettingsLayout>{page}</OrganizationSettingsLayout> |
| 50 | </OrganizationLayout> |
| 51 | </DefaultLayout> |
| 52 | ) |
| 53 | |
| 54 | export default OrgDocuments |