Skip to content

Commit 4e7783f

Browse files
authored
chore: Remove deprecatedRouteProps for /pull/ (#103223)
This route only uses `children`, so it's quick to convert to `<Outlet>`
1 parent da548c8 commit 4e7783f

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

static/app/router/routes.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2566,7 +2566,6 @@ function buildRoutes(): RouteObject[] {
25662566
component: make(() => import('sentry/views/pullRequest/index')),
25672567
withOrgPath: true,
25682568
children: pullRequestChildren,
2569-
deprecatedRouteProps: true,
25702569
};
25712570

25722571
const feedbackV2Children: SentryRouteObject[] = [

static/app/views/pullRequest/index.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import {Outlet} from 'react-router-dom';
2+
13
import Feature from 'sentry/components/acl/feature';
24
import {Alert} from 'sentry/components/core/alert';
35
import * as Layout from 'sentry/components/layouts/thirds';
@@ -6,11 +8,7 @@ import {t} from 'sentry/locale';
68
import {UrlParamBatchProvider} from 'sentry/utils/url/urlParamBatchContext';
79
import useOrganization from 'sentry/utils/useOrganization';
810

9-
type Props = {
10-
children: NonNullable<React.ReactNode>;
11-
};
12-
13-
function PullRequestContainer({children}: Props) {
11+
export default function PullRequestContainer() {
1412
const organization = useOrganization();
1513

1614
return (
@@ -28,10 +26,10 @@ function PullRequestContainer({children}: Props) {
2826
)}
2927
>
3028
<NoProjectMessage organization={organization}>
31-
<UrlParamBatchProvider>{children}</UrlParamBatchProvider>
29+
<UrlParamBatchProvider>
30+
<Outlet />
31+
</UrlParamBatchProvider>
3232
</NoProjectMessage>
3333
</Feature>
3434
);
3535
}
36-
37-
export default PullRequestContainer;

0 commit comments

Comments
 (0)