[endpointId].tsx24 lines · main
| 1 | import { useRouter } from 'next/router' |
| 2 | |
| 3 | import { PlatformWebhooksPage } from '@/components/interfaces/Platform/Webhooks' |
| 4 | import { DefaultLayout } from '@/components/layouts/DefaultLayout' |
| 5 | import OrganizationLayout from '@/components/layouts/OrganizationLayout' |
| 6 | import { OrganizationSettingsLayout } from '@/components/layouts/ProjectLayout/OrganizationSettingsLayout' |
| 7 | import type { NextPageWithLayout } from '@/types' |
| 8 | |
| 9 | const OrgWebhookEndpointSettings: NextPageWithLayout = () => { |
| 10 | const { query } = useRouter() |
| 11 | const endpointId = Array.isArray(query.endpointId) ? query.endpointId[0] : query.endpointId |
| 12 | |
| 13 | return <PlatformWebhooksPage scope="organization" endpointId={endpointId} /> |
| 14 | } |
| 15 | |
| 16 | OrgWebhookEndpointSettings.getLayout = (page) => ( |
| 17 | <DefaultLayout> |
| 18 | <OrganizationLayout title="Webhooks"> |
| 19 | <OrganizationSettingsLayout>{page}</OrganizationSettingsLayout> |
| 20 | </OrganizationLayout> |
| 21 | </DefaultLayout> |
| 22 | ) |
| 23 | |
| 24 | export default OrgWebhookEndpointSettings |