Skip to content

Commit 75597ac

Browse files
authored
fix(issue-stream): Fix bug where replay divider was shown despite no replays (#79068)
before: <img width="363" alt="image" src="https://github.com/user-attachments/assets/73e0283c-0d3f-4bb0-8f4f-053bfd703ab3"> after: <img width="369" alt="image" src="https://github.com/user-attachments/assets/e74a0573-2da5-460d-a1eb-2affe9620953">
1 parent 3ff902e commit 75597ac

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

static/app/components/eventOrGroupExtraDetails.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import type {Group} from 'sentry/types/group';
2121
import type {Organization} from 'sentry/types/organization';
2222
import {defined} from 'sentry/utils';
2323
import {getTitle} from 'sentry/utils/events';
24+
import useReplayCountForIssues from 'sentry/utils/replayCount/useReplayCountForIssues';
2425
import {projectCanLinkToReplay} from 'sentry/utils/replays/projectSupportsReplay';
2526
import withOrganization from 'sentry/utils/withOrganization';
2627

@@ -74,10 +75,13 @@ function EventOrGroupExtraDetails({
7475
} = data as Group;
7576

7677
const issuesPath = `/organizations/${organization.slug}/issues/`;
78+
const {getReplayCountForIssue} = useReplayCountForIssues();
7779

7880
const showReplayCount =
7981
organization.features.includes('session-replay') &&
80-
projectCanLinkToReplay(organization, project);
82+
projectCanLinkToReplay(organization, project) &&
83+
data.issueCategory &&
84+
!!getReplayCountForIssue(data.id, data.issueCategory);
8185

8286
const hasNewLayout = organization.features.includes('issue-stream-table-layout');
8387
const {subtitle} = getTitle(data);

0 commit comments

Comments
 (0)