Skip to content

Commit 64505ca

Browse files
authored
feat(issues): Remove legacy props from issue details (#96706)
Finishes the migration away from legacy router props for all issue details pages
1 parent 0ad4c4d commit 64505ca

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

static/app/routes.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2653,7 +2653,6 @@ function buildRoutes(): RouteObject[] {
26532653
{
26542654
path: ':groupId/',
26552655
component: make(() => import('sentry/views/issueDetails/groupDetails')),
2656-
deprecatedRouteProps: true,
26572656
children: [
26582657
...issueTabs,
26592658
{

static/app/views/issueDetails/groupDetails.tsx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {Fragment, useCallback, useEffect, useMemo, useState} from 'react';
2+
import {Outlet} from 'react-router-dom';
23
import styled from '@emotion/styled';
34
import * as Sentry from '@sentry/react';
45
import isEqual from 'lodash/isEqual';
@@ -82,10 +83,6 @@ import {
8283

8384
type Error = (typeof ERROR_TYPES)[keyof typeof ERROR_TYPES] | null;
8485

85-
interface GroupDetailsProps {
86-
children: React.ReactNode;
87-
}
88-
8986
type FetchGroupDetailsState = {
9087
error: boolean;
9188
errorType: Error;
@@ -96,7 +93,8 @@ type FetchGroupDetailsState = {
9693
refetchGroup: () => void;
9794
};
9895

99-
interface GroupDetailsContentProps extends GroupDetailsProps {
96+
interface GroupDetailsContentProps {
97+
children: React.ReactNode;
10098
event: Event | null;
10199
group: Group;
102100
project: Project;
@@ -744,7 +742,11 @@ function GroupDetailsContent({
744742
);
745743
}
746744

747-
function GroupDetailsPageContent(props: GroupDetailsProps & FetchGroupDetailsState) {
745+
interface GroupDetailsPageContentProps extends FetchGroupDetailsState {
746+
children: React.ReactNode;
747+
}
748+
749+
function GroupDetailsPageContent(props: GroupDetailsPageContentProps) {
748750
const projectSlug = props.group?.project?.slug;
749751
const api = useApi();
750752
const organization = useOrganization();
@@ -857,7 +859,7 @@ function GroupDetailsPageContent(props: GroupDetailsProps & FetchGroupDetailsSta
857859
);
858860
}
859861

860-
function GroupDetails(props: GroupDetailsProps) {
862+
function GroupDetails() {
861863
const organization = useOrganization();
862864
const {group, ...fetchGroupDetailsProps} = useFetchGroupDetails();
863865
const isSampleError = useIsSampleEvent();
@@ -895,7 +897,9 @@ function GroupDetails(props: GroupDetailsProps) {
895897
shouldForceProject
896898
>
897899
{config?.showFeedbackWidget && <FloatingFeedbackWidget />}
898-
<GroupDetailsPageContent {...props} {...fetchGroupDetailsProps} group={group} />
900+
<GroupDetailsPageContent {...fetchGroupDetailsProps} group={group}>
901+
<Outlet />
902+
</GroupDetailsPageContent>
899903
</PageFiltersContainer>
900904
</SentryDocumentTitle>
901905
</Fragment>

0 commit comments

Comments
 (0)