index.tsx 934 B

123456789101112131415161718192021222324252627282930
  1. import type {RouteComponentProps} from 'react-router';
  2. import Feature from 'sentry/components/acl/feature';
  3. import FeatureDisabled from 'sentry/components/acl/featureDisabled';
  4. import {t} from 'sentry/locale';
  5. import type {Group, Organization} from 'sentry/types';
  6. import withOrganization from 'sentry/utils/withOrganization';
  7. import GroupEventAttachments from './groupEventAttachments';
  8. type Props = RouteComponentProps<{groupId: string}, {}> & {
  9. group: Group;
  10. organization: Organization;
  11. };
  12. function GroupEventAttachmentsContainer({organization, group}: Props) {
  13. return (
  14. <Feature
  15. features="event-attachments"
  16. organization={organization}
  17. renderDisabled={props => (
  18. <FeatureDisabled {...props} featureName={t('Event Attachments')} />
  19. )}
  20. >
  21. <GroupEventAttachments project={group.project} />
  22. </Feature>
  23. );
  24. }
  25. export default withOrganization(GroupEventAttachmentsContainer);