projectCreateServiceHook.tsx 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. import {Fragment} from 'react';
  2. import {RouteComponentProps} from 'react-router';
  3. import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
  4. import {t} from 'sentry/locale';
  5. import {Organization} from 'sentry/types';
  6. import withOrganization from 'sentry/utils/withOrganization';
  7. import SettingsPageHeader from 'sentry/views/settings/components/settingsPageHeader';
  8. import ServiceHookSettingsForm from 'sentry/views/settings/project/serviceHookSettingsForm';
  9. type Props = RouteComponentProps<{projectId: string}, {}> & {
  10. organization: Organization;
  11. };
  12. function ProjectCreateServiceHook({organization, params}: Props) {
  13. const {projectId} = params;
  14. const title = t('Create Service Hook');
  15. return (
  16. <SentryDocumentTitle title={title}>
  17. <Fragment>
  18. <SettingsPageHeader title={title} />
  19. <ServiceHookSettingsForm
  20. organization={organization}
  21. projectId={projectId}
  22. initialData={{events: [], isActive: true}}
  23. />
  24. </Fragment>
  25. </SentryDocumentTitle>
  26. );
  27. }
  28. export default withOrganization(ProjectCreateServiceHook);