similarIssuesDataSection.tsx 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import {t} from 'sentry/locale';
  2. import type {Group} from 'sentry/types/group';
  3. import type {Project} from 'sentry/types/project';
  4. import {useLocation} from 'sentry/utils/useLocation';
  5. import useOrganization from 'sentry/utils/useOrganization';
  6. import GroupSimilarIssues from 'sentry/views/issueDetails/groupSimilarIssues/similarIssues';
  7. import {SectionKey} from 'sentry/views/issueDetails/streamline/context';
  8. import {FoldSection} from 'sentry/views/issueDetails/streamline/foldSection';
  9. interface SimilarIssuesDataSectionProps {
  10. group: Group;
  11. project: Project;
  12. }
  13. export function SimilarIssuesDataSection({
  14. project,
  15. group,
  16. }: SimilarIssuesDataSectionProps) {
  17. const organization = useOrganization();
  18. const location = useLocation();
  19. return (
  20. <FoldSection
  21. sectionKey={SectionKey.SIMILAR_ISSUES}
  22. title={t('Similar Issues')}
  23. initialCollapse
  24. >
  25. <GroupSimilarIssues
  26. location={location}
  27. params={{
  28. groupId: group.id,
  29. orgId: organization.id,
  30. }}
  31. project={project}
  32. />
  33. </FoldSection>
  34. );
  35. }