overviewWrapper.tsx 758 B

123456789101112131415161718
  1. import type {RouteComponentProps} from 'sentry/types/legacyReactRouter';
  2. import useOrganization from 'sentry/utils/useOrganization';
  3. import IssueListOverview from 'sentry/views/issueList/overview';
  4. import IssueListOverviewFc from 'sentry/views/issueList/overviewFc';
  5. type OverviewWrapperProps = RouteComponentProps<{}, {searchId?: string}>;
  6. // This is a temporary wrapper to allow us to migrate to the refactored issue stream component.
  7. // Remove once feature flag is retired.
  8. export function OverviewWrapper(props: OverviewWrapperProps) {
  9. const organization = useOrganization();
  10. if (organization.features.includes('issue-stream-functional-refactor')) {
  11. return <IssueListOverviewFc {...props} />;
  12. }
  13. return <IssueListOverview {...props} />;
  14. }