index.tsx 987 B

12345678910111213141516171819202122232425262728293031
  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} from 'sentry/types/group';
  6. import type {Organization} from 'sentry/types/organization';
  7. import withOrganization from 'sentry/utils/withOrganization';
  8. import GroupEventAttachments from './groupEventAttachments';
  9. type Props = RouteComponentProps<{groupId: string}, {}> & {
  10. group: Group;
  11. organization: Organization;
  12. };
  13. function GroupEventAttachmentsContainer({organization, group}: Props) {
  14. return (
  15. <Feature
  16. features="event-attachments"
  17. organization={organization}
  18. renderDisabled={props => (
  19. <FeatureDisabled {...props} featureName={t('Event Attachments')} />
  20. )}
  21. >
  22. <GroupEventAttachments project={group.project} />
  23. </Feature>
  24. );
  25. }
  26. export default withOrganization(GroupEventAttachmentsContainer);