Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(related_issues): Prevent race condition #72036

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions static/app/views/issueDetails/groupEventHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ function GroupEventHeader({event, group, project}: GroupEventHeaderProps) {
'related-issues-issue-details-page'
);
// This is also called within the TraceTimeline component but caching will save a second call
const {oneOtherIssueEvent} = useTraceTimelineEvents({
const {isLoading, oneOtherIssueEvent} = useTraceTimelineEvents({
event,
});

return (
<StyledDataSection>
<GroupEventCarousel group={group} event={event} projectSlug={project.slug} />
{isRelatedIssuesEnabled && oneOtherIssueEvent && (
{isRelatedIssuesEnabled && !isLoading && oneOtherIssueEvent && (
<StyledTraceLink>
One other issue appears in the same trace.
<TraceLink event={event} />
</StyledTraceLink>
)}
{/* This will be the default when we have GAed related issues */}
{isRelatedIssuesEnabled && oneOtherIssueEvent === undefined && (
{isRelatedIssuesEnabled && !isLoading && oneOtherIssueEvent === undefined && (
<TraceLink event={event} />
)}
{issueTypeConfig.traceTimeline && <TraceTimeline event={event} />}
Expand Down
Loading