index.tsx 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import {RouteComponentProps} from 'react-router';
  2. import Feature from 'sentry/components/acl/feature';
  3. import Alert from 'sentry/components/alert';
  4. import {t} from 'sentry/locale';
  5. import {PageContent} from 'sentry/styles/organization';
  6. import {Group, Organization, Project} from 'sentry/types';
  7. import withOrganization from 'sentry/utils/withOrganization';
  8. import Grouping from './grouping';
  9. type Props = RouteComponentProps<{}, {}> & {
  10. group: Group;
  11. organization: Organization;
  12. project: Project;
  13. };
  14. function GroupingContainer({organization, location, group, router, project}: Props) {
  15. return (
  16. <Feature
  17. features={['grouping-tree-ui']}
  18. organization={organization}
  19. renderDisabled={() => (
  20. <PageContent>
  21. <Alert type="warning">{t("You don't have access to this feature")}</Alert>
  22. </PageContent>
  23. )}
  24. >
  25. <Grouping
  26. location={location}
  27. groupId={group.id}
  28. organization={organization}
  29. router={router}
  30. projSlug={project.slug}
  31. />
  32. </Feature>
  33. );
  34. }
  35. export default withOrganization(GroupingContainer);