secrets.tsx53 lines · main
| 1 | import { PageContainer } from 'ui-patterns/PageContainer' |
| 2 | import { |
| 3 | PageHeader, |
| 4 | PageHeaderDescription, |
| 5 | PageHeaderMeta, |
| 6 | PageHeaderSummary, |
| 7 | PageHeaderTitle, |
| 8 | } from 'ui-patterns/PageHeader' |
| 9 | import { PageSection, PageSectionContent } from 'ui-patterns/PageSection' |
| 10 | |
| 11 | import { EdgeFunctionSecrets } from '@/components/interfaces/Functions/EdgeFunctionSecrets/EdgeFunctionSecrets' |
| 12 | import { FunctionsSecretsEmptyStateLocal } from '@/components/interfaces/Functions/FunctionsEmptyState' |
| 13 | import { DefaultLayout } from '@/components/layouts/DefaultLayout' |
| 14 | import EdgeFunctionsLayout from '@/components/layouts/EdgeFunctionsLayout/EdgeFunctionsLayout' |
| 15 | import { IS_PLATFORM } from '@/lib/constants' |
| 16 | import type { NextPageWithLayout } from '@/types' |
| 17 | |
| 18 | const SecretsPage: NextPageWithLayout = () => { |
| 19 | return ( |
| 20 | <PageContainer size="large"> |
| 21 | <PageSection> |
| 22 | <PageSectionContent className="space-y-4 md:space-y-8"> |
| 23 | {IS_PLATFORM ? <EdgeFunctionSecrets /> : <FunctionsSecretsEmptyStateLocal />} |
| 24 | </PageSectionContent> |
| 25 | </PageSection> |
| 26 | </PageContainer> |
| 27 | ) |
| 28 | } |
| 29 | |
| 30 | SecretsPage.getLayout = (page) => { |
| 31 | return ( |
| 32 | <DefaultLayout> |
| 33 | <EdgeFunctionsLayout title="Secrets"> |
| 34 | <div className="w-full min-h-full flex flex-col items-stretch"> |
| 35 | <PageHeader size="large"> |
| 36 | <PageHeaderMeta> |
| 37 | <PageHeaderSummary> |
| 38 | <PageHeaderTitle>Edge Function Secrets</PageHeaderTitle> |
| 39 | <PageHeaderDescription> |
| 40 | Manage encrypted values for your functions |
| 41 | </PageHeaderDescription> |
| 42 | </PageHeaderSummary> |
| 43 | </PageHeaderMeta> |
| 44 | </PageHeader> |
| 45 | |
| 46 | {page} |
| 47 | </div> |
| 48 | </EdgeFunctionsLayout> |
| 49 | </DefaultLayout> |
| 50 | ) |
| 51 | } |
| 52 | |
| 53 | export default SecretsPage |