index.tsx 922 B

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