-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
chore: Remove deprecatedRouteProps for /pull/ #103223
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| import {Outlet} from 'react-router-dom'; | ||
|
|
||
| import Feature from 'sentry/components/acl/feature'; | ||
| import {Alert} from 'sentry/components/core/alert'; | ||
| import * as Layout from 'sentry/components/layouts/thirds'; | ||
|
|
@@ -6,11 +8,7 @@ import {t} from 'sentry/locale'; | |
| import {UrlParamBatchProvider} from 'sentry/utils/url/urlParamBatchContext'; | ||
| import useOrganization from 'sentry/utils/useOrganization'; | ||
|
|
||
| type Props = { | ||
| children: NonNullable<React.ReactNode>; | ||
| }; | ||
|
|
||
| function PullRequestContainer({children}: Props) { | ||
| export default function PullRequestContainer() { | ||
| const organization = useOrganization(); | ||
|
|
||
| return ( | ||
|
|
@@ -28,10 +26,10 @@ function PullRequestContainer({children}: Props) { | |
| )} | ||
| > | ||
| <NoProjectMessage organization={organization}> | ||
| <UrlParamBatchProvider>{children}</UrlParamBatchProvider> | ||
| <UrlParamBatchProvider> | ||
| <Outlet /> | ||
| </UrlParamBatchProvider> | ||
| </NoProjectMessage> | ||
| </Feature> | ||
| ); | ||
| } | ||
|
Comment on lines
26
to
35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The migration from a children prop to React Router v6's 🤖 Prompt for AI Agent Did we get this right? 👍 / 👎 to inform future reviews. |
||
|
|
||
| export default PullRequestContainer; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change from a named export to a default export is appropriate. However, verify that no other files are importing
PullRequestContaineras a named import (e.g.,import { PullRequestContainer }). Search the codebase for any named imports to ensure compatibility. Only the route configuration should reference this component via default export.Severity: MEDIUM
🤖 Prompt for AI Agent
Did we get this right? 👍 / 👎 to inform future reviews.