similarIssuesDrawer.tsx 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import ProjectAvatar from 'sentry/components/avatar/projectAvatar';
  2. import {
  3. CrumbContainer,
  4. EventDrawerBody,
  5. EventDrawerContainer,
  6. EventDrawerHeader,
  7. EventNavigator,
  8. Header,
  9. NavigationCrumbs,
  10. ShortId,
  11. } from 'sentry/components/events/eventDrawer';
  12. import {t} from 'sentry/locale';
  13. import type {Group} from 'sentry/types/group';
  14. import type {Project} from 'sentry/types/project';
  15. import {useLocation} from 'sentry/utils/useLocation';
  16. import useOrganization from 'sentry/utils/useOrganization';
  17. import GroupSimilarIssues from 'sentry/views/issueDetails/groupSimilarIssues/similarIssues';
  18. export function SimilarIssuesDrawer({group, project}: {group: Group; project: Project}) {
  19. const organization = useOrganization();
  20. const location = useLocation();
  21. return (
  22. <EventDrawerContainer>
  23. <EventDrawerHeader>
  24. <NavigationCrumbs
  25. crumbs={[
  26. {
  27. label: (
  28. <CrumbContainer>
  29. <ProjectAvatar project={project} />
  30. <ShortId>{group.shortId}</ShortId>
  31. </CrumbContainer>
  32. ),
  33. },
  34. {label: t('Similar Issues')},
  35. ]}
  36. />
  37. </EventDrawerHeader>
  38. <EventNavigator>
  39. <Header>{t('Similar Issues')}</Header>
  40. </EventNavigator>
  41. <EventDrawerBody>
  42. <GroupSimilarIssues
  43. location={location}
  44. params={{
  45. groupId: group.id,
  46. orgId: organization.id,
  47. }}
  48. project={project}
  49. />
  50. </EventDrawerBody>
  51. </EventDrawerContainer>
  52. );
  53. }