groupMergedTab.tsx 1.1 KB

123456789101112131415161718192021222324252627282930
  1. import * as Layout from 'sentry/components/layouts/thirds';
  2. import type {Group} from 'sentry/types/group';
  3. import {useLocation} from 'sentry/utils/useLocation';
  4. import {useParams} from 'sentry/utils/useParams';
  5. import GroupEventDetails, {
  6. type GroupEventDetailsProps,
  7. } from 'sentry/views/issueDetails/groupEventDetails/groupEventDetails';
  8. import GroupMergedView from 'sentry/views/issueDetails/groupMerged';
  9. import {useHasStreamlinedUI} from 'sentry/views/issueDetails/utils';
  10. function GroupMergedTab(props: GroupEventDetailsProps) {
  11. const {groupId} = useParams<{groupId: Group['id']}>();
  12. const location = useLocation();
  13. const hasStreamlinedUI = useHasStreamlinedUI();
  14. // TODO(streamline-ui): Point router to event details page since merged issues opens in a drawer.
  15. if (hasStreamlinedUI) {
  16. return <GroupEventDetails {...props} />;
  17. }
  18. return (
  19. <Layout.Body>
  20. <Layout.Main fullWidth>
  21. <GroupMergedView project={props.project} params={{groupId}} location={location} />
  22. </Layout.Main>
  23. </Layout.Body>
  24. );
  25. }
  26. export default GroupMergedTab;