index.tsx 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. import Feature from 'sentry/components/acl/feature';
  2. import FeatureDisabled from 'sentry/components/acl/featureDisabled';
  3. import * as Layout from 'sentry/components/layouts/thirds';
  4. import {t} from 'sentry/locale';
  5. import type {Group} from 'sentry/types/group';
  6. import type {RouteComponentProps} from 'sentry/types/legacyReactRouter';
  7. import useOrganization from 'sentry/utils/useOrganization';
  8. import GroupEventAttachments from './groupEventAttachments';
  9. type Props = RouteComponentProps<{groupId: string}, {}> & {
  10. group: Group;
  11. };
  12. function GroupEventAttachmentsContainer({group}: Props) {
  13. const organization = useOrganization();
  14. return (
  15. <Feature
  16. features="event-attachments"
  17. organization={organization}
  18. renderDisabled={props => (
  19. <FeatureDisabled {...props} featureName={t('Event Attachments')} />
  20. )}
  21. >
  22. <Layout.Body>
  23. <Layout.Main fullWidth>
  24. <GroupEventAttachments project={group.project} groupId={group.id} />
  25. </Layout.Main>
  26. </Layout.Body>
  27. </Feature>
  28. );
  29. }
  30. export default GroupEventAttachmentsContainer;