diff --git a/static/app/components/deprecatedAsyncComponent.tsx b/static/app/components/deprecatedAsyncComponent.tsx index b4b785d20c2470..160ab173a516fa 100644 --- a/static/app/components/deprecatedAsyncComponent.tsx +++ b/static/app/components/deprecatedAsyncComponent.tsx @@ -15,7 +15,7 @@ import type { import PermissionDenied from 'sentry/views/permissionDenied'; import RouteError from 'sentry/views/routeError'; -export interface AsyncComponentProps extends Partial> {} +export interface AsyncComponentProps extends Partial {} export interface AsyncComponentState { [key: string]: any; diff --git a/static/app/components/search/sources/routeSource.tsx b/static/app/components/search/sources/routeSource.tsx index 479907ecf78b6e..fc5589aaf41bdf 100644 --- a/static/app/components/search/sources/routeSource.tsx +++ b/static/app/components/search/sources/routeSource.tsx @@ -56,7 +56,7 @@ type DefaultProps = { searchOptions: Fuse.IFuseOptions; }; -type Props = RouteComponentProps<{}, {}> & +type Props = RouteComponentProps & DefaultProps & { /** * Render function that renders the route matches diff --git a/static/app/types/hooks.tsx b/static/app/types/hooks.tsx index d5fcf549e4258b..019ee936ff0e19 100644 --- a/static/app/types/hooks.tsx +++ b/static/app/types/hooks.tsx @@ -76,7 +76,7 @@ type DateRangeProps = React.ComponentProps; type SelectorItemsProps = React.ComponentProps; -type DisabledMemberViewProps = RouteComponentProps<{orgId: string}, {}>; +type DisabledMemberViewProps = RouteComponentProps<{orgId: string}>; type MemberListHeaderProps = { members: Member[]; diff --git a/static/app/types/legacyReactRouter.tsx b/static/app/types/legacyReactRouter.tsx index 2ea7fd801b57f5..60bcb22adf99b0 100644 --- a/static/app/types/legacyReactRouter.tsx +++ b/static/app/types/legacyReactRouter.tsx @@ -84,9 +84,14 @@ export interface PlainRoute extends RouteProps { indexRoute?: PlainRoute | undefined; } -export interface RouteComponentProps { +export interface RouteComponentProps< + P = Record, + R = Record, + ComponentProps = any, + Q = any, +> { location: Location; - params: P & R; + params: P; route: PlainRoute; routeParams: R; router: InjectedRouter; @@ -100,7 +105,7 @@ type ActiveFunction = (location: LocationDescriptor, indexOnly?: boolean) => boo type LeaveHookFunction = (route: any, callback: RouteHook) => () => void; type CreatePartFunction = (pathOrLoc: LocationDescriptor, query?: any) => Part; -export interface InjectedRouter

, Q = any> { +export interface InjectedRouter

, Q = any> { createHref: CreatePartFunction; createPath: CreatePartFunction; go: GoFunction; @@ -115,14 +120,14 @@ export interface InjectedRouter

, Q = any> { setRouteLeaveHook: LeaveHookFunction; } -export interface WithRouterProps

, Q = any> { +export interface WithRouterProps

, Q = any> { location: Location; params: P; router: InjectedRouter; routes: PlainRoute[]; } -export interface RouteContextInterface

, Q = any> { +export interface RouteContextInterface

, Q = any> { location: Location; params: P; router: InjectedRouter; diff --git a/static/app/utils/withDomainRedirect.spec.tsx b/static/app/utils/withDomainRedirect.spec.tsx index 68d92776d05ba5..1169a313f55829 100644 --- a/static/app/utils/withDomainRedirect.spec.tsx +++ b/static/app/utils/withDomainRedirect.spec.tsx @@ -24,7 +24,7 @@ const projectRoutes = [ ]; describe('withDomainRedirect', function () { - type Props = RouteComponentProps<{orgId: string}, {}>; + type Props = RouteComponentProps<{orgId: string}>; function MyComponent(props: Props) { const {params} = props; return

Org slug: {params.orgId ?? 'no org slug'}
; diff --git a/static/app/utils/withDomainRedirect.tsx b/static/app/utils/withDomainRedirect.tsx index 54d5f5e4af5cae..57b5c996cfd684 100644 --- a/static/app/utils/withDomainRedirect.tsx +++ b/static/app/utils/withDomainRedirect.tsx @@ -30,7 +30,7 @@ import useOrganization from './useOrganization'; * If either a customer domain is not being used, or if :orgId is not present in the route path, then WrappedComponent * is rendered. */ -function withDomainRedirect

>( +function withDomainRedirect

( WrappedComponent: RouteComponent ) { return function WithDomainRedirectWrapper(props: P) { @@ -60,7 +60,6 @@ function withDomainRedirect

>( // Regenerate the full route with the :orgId parameter omitted. const newParams = {...params}; Object.keys(params).forEach(param => { - // @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message newParams[param] = `:${param}`; }); const fullRoute = recreateRoute('', {routes, params: newParams}); diff --git a/static/app/utils/withDomainRequired.spec.tsx b/static/app/utils/withDomainRequired.spec.tsx index c16dd7d4296342..947b4072b258b2 100644 --- a/static/app/utils/withDomainRequired.spec.tsx +++ b/static/app/utils/withDomainRequired.spec.tsx @@ -11,7 +11,7 @@ import withDomainRequired from 'sentry/utils/withDomainRequired'; const originalLocation = window.location; describe('withDomainRequired', function () { - type Props = RouteComponentProps<{orgId: string}, {}>; + type Props = RouteComponentProps<{orgId: string}>; function MyComponent(props: Props) { const {params} = props; return

Org slug: {params.orgId ?? 'no org slug'}
; diff --git a/static/app/utils/withDomainRequired.tsx b/static/app/utils/withDomainRequired.tsx index f12e26fdabde05..cc92e4865cd118 100644 --- a/static/app/utils/withDomainRequired.tsx +++ b/static/app/utils/withDomainRequired.tsx @@ -28,7 +28,7 @@ import type {RouteComponent, RouteComponentProps} from 'sentry/types/legacyReact * * Whenever https://orgslug.sentry.io/ is accessed in the browser, then both conditions above will be satisfied. */ -export default function withDomainRequired

>( +export default function withDomainRequired

( WrappedComponent: RouteComponent ) { return function withDomainRequiredWrapper(props: P) { diff --git a/static/app/views/acceptProjectTransfer/index.tsx b/static/app/views/acceptProjectTransfer/index.tsx index 6ded17d2c6d022..21946d6d20327d 100644 --- a/static/app/views/acceptProjectTransfer/index.tsx +++ b/static/app/views/acceptProjectTransfer/index.tsx @@ -11,7 +11,7 @@ import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; import SettingsPageHeader from 'sentry/views/settings/components/settingsPageHeader'; -type Props = RouteComponentProps<{}, {}>; +type Props = RouteComponentProps; type TransferDetails = { organizations: Organization[]; diff --git a/static/app/views/admin/adminLayout.tsx b/static/app/views/admin/adminLayout.tsx index d638f7b45ecb72..c71cc05fc88de1 100644 --- a/static/app/views/admin/adminLayout.tsx +++ b/static/app/views/admin/adminLayout.tsx @@ -39,7 +39,7 @@ const renderAdminNavigation = () => ( type Props = { children: React.ReactNode; -} & RouteComponentProps<{}, {}>; +} & RouteComponentProps; function AdminLayout({children, ...props}: Props) { return ( diff --git a/static/app/views/admin/adminOrganizations.tsx b/static/app/views/admin/adminOrganizations.tsx index 5db2f8441af430..13f2fd1809ee5b 100644 --- a/static/app/views/admin/adminOrganizations.tsx +++ b/static/app/views/admin/adminOrganizations.tsx @@ -3,7 +3,7 @@ import ResultGrid from 'sentry/components/resultGrid'; import {t} from 'sentry/locale'; import type {RouteComponentProps} from 'sentry/types/legacyReactRouter'; -type Props = RouteComponentProps<{}, {}>; +type Props = RouteComponentProps; const getRow = (row: any) => [ diff --git a/static/app/views/admin/adminProjects.tsx b/static/app/views/admin/adminProjects.tsx index 6b358d3af9ddd6..5f60aa7c868b3c 100644 --- a/static/app/views/admin/adminProjects.tsx +++ b/static/app/views/admin/adminProjects.tsx @@ -13,7 +13,7 @@ type Row = { status: string; }; -type Props = RouteComponentProps<{}, {}>; +type Props = RouteComponentProps; const getRow = (row: Row) => [ diff --git a/static/app/views/admin/adminRelays.tsx b/static/app/views/admin/adminRelays.tsx index 22b0eb3b399545..1250ab9d5425dd 100644 --- a/static/app/views/admin/adminRelays.tsx +++ b/static/app/views/admin/adminRelays.tsx @@ -10,7 +10,7 @@ import withApi from 'sentry/utils/withApi'; const prettyDate = (x: string) => moment(x).format('ll LTS'); -type Props = RouteComponentProps<{}, {}> & {api: Client}; +type Props = RouteComponentProps & {api: Client}; type State = { loading: boolean; diff --git a/static/app/views/admin/adminUserEdit.tsx b/static/app/views/admin/adminUserEdit.tsx index 5496f3625ecf0e..993cdfe25c0b78 100644 --- a/static/app/views/admin/adminUserEdit.tsx +++ b/static/app/views/admin/adminUserEdit.tsx @@ -120,7 +120,7 @@ class RemoveUserModal extends Component { } } -type Props = DeprecatedAsyncComponent['props'] & RouteComponentProps<{id: string}, {}>; +type Props = DeprecatedAsyncComponent['props'] & RouteComponentProps<{id: string}>; type State = DeprecatedAsyncComponent['state'] & { user: User | null; diff --git a/static/app/views/admin/adminUsers.tsx b/static/app/views/admin/adminUsers.tsx index b7c0e7d2a24220..cdc39734ee8b1c 100644 --- a/static/app/views/admin/adminUsers.tsx +++ b/static/app/views/admin/adminUsers.tsx @@ -13,7 +13,7 @@ type Row = { username: string; }; -type Props = RouteComponentProps<{}, {}>; +type Props = RouteComponentProps; const getRow = (row: Row) => [ diff --git a/static/app/views/alerts/builder/projectProvider.tsx b/static/app/views/alerts/builder/projectProvider.tsx index 8edbefa0e75c9b..6238b571a1db61 100644 --- a/static/app/views/alerts/builder/projectProvider.tsx +++ b/static/app/views/alerts/builder/projectProvider.tsx @@ -12,7 +12,7 @@ import {useIsMountedRef} from 'sentry/utils/useIsMountedRef'; import useProjects from 'sentry/utils/useProjects'; import useScrollToTop from 'sentry/utils/useScrollToTop'; -type Props = RouteComponentProps & { +type Props = RouteComponentProps & { hasMetricAlerts: boolean; organization: Organization; children?: React.ReactNode; diff --git a/static/app/views/alerts/create.tsx b/static/app/views/alerts/create.tsx index 675bb1b58e964f..0fcfc90fa9327e 100644 --- a/static/app/views/alerts/create.tsx +++ b/static/app/views/alerts/create.tsx @@ -37,7 +37,7 @@ type RouteParams = { projectId?: string; }; -type Props = RouteComponentProps & { +type Props = RouteComponentProps & { hasMetricAlerts: boolean; members: Member[] | undefined; organization: Organization; diff --git a/static/app/views/alerts/edit.tsx b/static/app/views/alerts/edit.tsx index 2ecc3b19673b84..0c88b4bd1de86d 100644 --- a/static/app/views/alerts/edit.tsx +++ b/static/app/views/alerts/edit.tsx @@ -24,7 +24,7 @@ type RouteParams = { ruleId: string; }; -type Props = RouteComponentProps & { +type Props = RouteComponentProps & { hasMetricAlerts: boolean; hasUptimeAlerts: boolean; members: Member[] | undefined; diff --git a/static/app/views/alerts/incidentRedirect.tsx b/static/app/views/alerts/incidentRedirect.tsx index 7d99401066e346..96461229b332ba 100644 --- a/static/app/views/alerts/incidentRedirect.tsx +++ b/static/app/views/alerts/incidentRedirect.tsx @@ -15,7 +15,7 @@ import {alertDetailsLink} from './utils'; type Props = { organization: Organization; -} & RouteComponentProps<{alertId: string}, {}>; +} & RouteComponentProps<{alertId: string}>; /** * Reirects from an incident to the incident's metric alert details page diff --git a/static/app/views/alerts/list/incidents/index.tsx b/static/app/views/alerts/list/incidents/index.tsx index 0fd3b469d14db3..d7bc5f99726e44 100644 --- a/static/app/views/alerts/list/incidents/index.tsx +++ b/static/app/views/alerts/list/incidents/index.tsx @@ -32,7 +32,7 @@ import AlertListRow from './row'; const DOCS_URL = 'https://docs.sentry.io/workflow/alerts-notifications/alerts/?_ga=2.21848383.580096147.1592364314-1444595810.1582160976'; -type Props = RouteComponentProps<{}, {}> & { +type Props = RouteComponentProps & { organization: Organization; }; diff --git a/static/app/views/alerts/rules/crons/details.tsx b/static/app/views/alerts/rules/crons/details.tsx index 5c36c7a1127905..145ad4af2aa948 100644 --- a/static/app/views/alerts/rules/crons/details.tsx +++ b/static/app/views/alerts/rules/crons/details.tsx @@ -40,7 +40,7 @@ import {makeMonitorDetailsQueryKey} from 'sentry/views/monitors/utils'; const DEFAULT_POLL_INTERVAL_MS = 5000; -type Props = RouteComponentProps<{monitorSlug: string; projectId: string}, {}>; +type Props = RouteComponentProps<{monitorSlug: string; projectId: string}>; function hasLastCheckIn(monitor: Monitor) { return monitor.environments.some(e => e.lastCheckIn); diff --git a/static/app/views/alerts/rules/issue/details/ruleDetails.tsx b/static/app/views/alerts/rules/issue/details/ruleDetails.tsx index d8eda44c247cb2..40334fae571f7b 100644 --- a/static/app/views/alerts/rules/issue/details/ruleDetails.tsx +++ b/static/app/views/alerts/rules/issue/details/ruleDetails.tsx @@ -47,7 +47,7 @@ import AlertRuleIssuesList from './issuesList'; import Sidebar from './sidebar'; interface AlertRuleDetailsProps - extends RouteComponentProps<{projectId: string; ruleId: string}, {}> {} + extends RouteComponentProps<{projectId: string; ruleId: string}> {} const PAGE_QUERY_PARAMS = [ 'pageStatsPeriod', diff --git a/static/app/views/alerts/rules/issue/index.tsx b/static/app/views/alerts/rules/issue/index.tsx index dda7619457ef53..34e426ba7af090 100644 --- a/static/app/views/alerts/rules/issue/index.tsx +++ b/static/app/views/alerts/rules/issue/index.tsx @@ -146,7 +146,7 @@ type Props = { userTeamIds: string[]; loadingProjects?: boolean; onChangeTitle?: (data: string) => void; -} & RouteComponentProps; +} & RouteComponentProps; type State = DeprecatedAsyncComponent['state'] & { configs: IssueAlertConfiguration | null; diff --git a/static/app/views/alerts/rules/metric/create.tsx b/static/app/views/alerts/rules/metric/create.tsx index d00e42e322a1e3..16054046882bd3 100644 --- a/static/app/views/alerts/rules/metric/create.tsx +++ b/static/app/views/alerts/rules/metric/create.tsx @@ -27,7 +27,7 @@ type Props = { userTeamIds: string[]; sessionId?: string; wizardTemplate?: WizardRuleTemplate; -} & RouteComponentProps; +} & RouteComponentProps; /** * Show metric rules form with an empty rule. Redirects to alerts list after creation. diff --git a/static/app/views/alerts/rules/metric/details/body.tsx b/static/app/views/alerts/rules/metric/details/body.tsx index 69b464bf56622c..1465e7049f1845 100644 --- a/static/app/views/alerts/rules/metric/details/body.tsx +++ b/static/app/views/alerts/rules/metric/details/body.tsx @@ -47,7 +47,7 @@ import RelatedTransactions from './relatedTransactions'; import {MetricDetailsSidebar} from './sidebar'; import {getFilter, getPeriodInterval} from './utils'; -export interface MetricDetailsBodyProps extends RouteComponentProps<{}, {}> { +export interface MetricDetailsBodyProps extends RouteComponentProps { api: Client; location: Location; organization: Organization; diff --git a/static/app/views/alerts/rules/metric/details/index.tsx b/static/app/views/alerts/rules/metric/details/index.tsx index 3ff0efb1b684e1..0b20bbd2763deb 100644 --- a/static/app/views/alerts/rules/metric/details/index.tsx +++ b/static/app/views/alerts/rules/metric/details/index.tsx @@ -38,7 +38,7 @@ import {ALERT_RULE_STATUS, TIME_OPTIONS, TIME_WINDOWS} from './constants'; import DetailsHeader from './header'; import {buildMetricGraphDateRange} from './utils'; -interface Props extends RouteComponentProps<{ruleId: string}, {}> { +interface Props extends RouteComponentProps<{ruleId: string}> { api: Client; location: Location; organization: Organization; diff --git a/static/app/views/alerts/rules/metric/duplicate.tsx b/static/app/views/alerts/rules/metric/duplicate.tsx index 35024ee24843d2..5e7e375fded4d1 100644 --- a/static/app/views/alerts/rules/metric/duplicate.tsx +++ b/static/app/views/alerts/rules/metric/duplicate.tsx @@ -20,7 +20,7 @@ import type {WizardRuleTemplate} from 'sentry/views/alerts/wizard/options'; import RuleForm from './ruleForm'; -interface MetricRuleDuplicateProps extends RouteComponentProps<{}, {}> { +interface MetricRuleDuplicateProps extends RouteComponentProps { project: Project; userTeamIds: string[]; eventView?: EventView; diff --git a/static/app/views/alerts/rules/metric/edit.tsx b/static/app/views/alerts/rules/metric/edit.tsx index 0f1ccec0553be2..f9e25262fdabe3 100644 --- a/static/app/views/alerts/rules/metric/edit.tsx +++ b/static/app/views/alerts/rules/metric/edit.tsx @@ -25,7 +25,7 @@ type Props = { organization: Organization; project: Project; userTeamIds: string[]; -} & RouteComponentProps; +} & RouteComponentProps; export function MetricRulesEdit({ organization, diff --git a/static/app/views/alerts/rules/metric/ruleForm.tsx b/static/app/views/alerts/rules/metric/ruleForm.tsx index b2c15986673812..483c9e87451564 100644 --- a/static/app/views/alerts/rules/metric/ruleForm.tsx +++ b/static/app/views/alerts/rules/metric/ruleForm.tsx @@ -115,7 +115,7 @@ type Props = { isDuplicateRule?: boolean; ruleId?: string; sessionId?: string; -} & RouteComponentProps<{projectId?: string; ruleId?: string}, {}> & { +} & RouteComponentProps<{projectId?: string; ruleId?: string}> & { onSubmitSuccess?: FormProps['onSubmitSuccess']; } & DeprecatedAsyncComponent['props']; diff --git a/static/app/views/alerts/rules/uptime/details.tsx b/static/app/views/alerts/rules/uptime/details.tsx index 1f6017374ada01..ab77e4cc042924 100644 --- a/static/app/views/alerts/rules/uptime/details.tsx +++ b/static/app/views/alerts/rules/uptime/details.tsx @@ -47,7 +47,7 @@ import {UptimeChecksTable} from './uptimeChecksTable'; import {UptimeIssues} from './uptimeIssues'; interface UptimeAlertDetailsProps - extends RouteComponentProps<{projectId: string; uptimeRuleId: string}, {}> {} + extends RouteComponentProps<{projectId: string; uptimeRuleId: string}> {} export default function UptimeAlertDetails({params}: UptimeAlertDetailsProps) { const api = useApi(); diff --git a/static/app/views/alerts/rules/uptime/edit.tsx b/static/app/views/alerts/rules/uptime/edit.tsx index 64527827cdf22b..a94238588b3226 100644 --- a/static/app/views/alerts/rules/uptime/edit.tsx +++ b/static/app/views/alerts/rules/uptime/edit.tsx @@ -27,7 +27,7 @@ type Props = { organization: Organization; project: Project; userTeamIds: string[]; -} & RouteComponentProps; +} & RouteComponentProps; export function UptimeRulesEdit({params, onChangeTitle, organization, project}: Props) { const api = useApi(); diff --git a/static/app/views/alerts/wizard/index.tsx b/static/app/views/alerts/wizard/index.tsx index d1ca738fa9263f..ec876c8dda3139 100644 --- a/static/app/views/alerts/wizard/index.tsx +++ b/static/app/views/alerts/wizard/index.tsx @@ -36,7 +36,7 @@ type RouteParams = { projectId?: string; }; -type AlertWizardProps = RouteComponentProps & { +type AlertWizardProps = RouteComponentProps & { organization: Organization; projectId: string; }; diff --git a/static/app/views/app/index.tsx b/static/app/views/app/index.tsx index 26eaf0d4b47532..0cd3aba1b71bf6 100644 --- a/static/app/views/app/index.tsx +++ b/static/app/views/app/index.tsx @@ -43,7 +43,7 @@ import {DEMO_HEADER_HEIGHT_PX} from '../../components/demo/demoHeader'; type Props = { children: React.ReactNode; -} & RouteComponentProps<{orgId?: string}, {}>; +} & RouteComponentProps<{orgId?: string}>; const InstallWizard = lazy( () => import('sentry/views/admin/installWizard') diff --git a/static/app/views/auth/login.tsx b/static/app/views/auth/login.tsx index ea3ce5b3300719..978d4f08572a31 100644 --- a/static/app/views/auth/login.tsx +++ b/static/app/views/auth/login.tsx @@ -27,7 +27,7 @@ type ActiveTab = keyof typeof FORM_COMPONENTS; type TabConfig = [key: ActiveTab, label: string, disabled?: boolean]; -type Props = RouteComponentProps<{orgId?: string}, {}> & { +type Props = RouteComponentProps<{orgId?: string}> & { api: Client; }; diff --git a/static/app/views/dashboards/create.tsx b/static/app/views/dashboards/create.tsx index dfa6de4d44208f..3d7f005d9c55ea 100644 --- a/static/app/views/dashboards/create.tsx +++ b/static/app/views/dashboards/create.tsx @@ -16,7 +16,7 @@ import type {Widget} from './types'; import {DashboardState} from './types'; import {cloneDashboard, constructWidgetFromQuery} from './utils'; -type Props = RouteComponentProps<{templateId?: string; widgetId?: string}, {}> & { +type Props = RouteComponentProps<{templateId?: string; widgetId?: string}> & { children: React.ReactNode; organization: Organization; }; diff --git a/static/app/views/dashboards/detail.spec.tsx b/static/app/views/dashboards/detail.spec.tsx index 96d317d089b420..1278bf6cceaeeb 100644 --- a/static/app/views/dashboards/detail.spec.tsx +++ b/static/app/views/dashboards/detail.spec.tsx @@ -852,7 +852,7 @@ describe('Dashboards > Detail', function () { @@ -878,7 +878,7 @@ describe('Dashboards > Detail', function () { ...initialData.router.location, pathname: '/widget/123/', }, - params: {orgId: 'org-slug', dashboardId: '1', widgetId: 123}, + params: {orgId: 'org-slug', dashboardId: '1', widgetId: '123'}, }); const openWidgetViewerModal = jest.spyOn(modals, 'openWidgetViewerModal'); MockApiClient.addMockResponse({ @@ -889,7 +889,7 @@ describe('Dashboards > Detail', function () { @@ -1047,7 +1047,7 @@ describe('Dashboards > Detail', function () { @@ -1087,7 +1087,7 @@ describe('Dashboards > Detail', function () { & { +type Props = RouteComponentProps & { api: Client; dashboard: DashboardDetails; dashboards: DashboardListItem[]; diff --git a/static/app/views/dashboards/index.tsx b/static/app/views/dashboards/index.tsx index d02e6ab2c4145c..77b5e9fe225e50 100644 --- a/static/app/views/dashboards/index.tsx +++ b/static/app/views/dashboards/index.tsx @@ -14,7 +14,7 @@ import OrgDashboards from './orgDashboards'; import {DashboardState} from './types'; import {DashboardBasicFeature} from './view'; -type Props = RouteComponentProps<{}, {}> & { +type Props = RouteComponentProps & { api: Client; children: React.ReactNode; organization: Organization; diff --git a/static/app/views/dashboards/orgDashboards.spec.tsx b/static/app/views/dashboards/orgDashboards.spec.tsx index 5bf36c7468d6ee..d818e52edca2d1 100644 --- a/static/app/views/dashboards/orgDashboards.spec.tsx +++ b/static/app/views/dashboards/orgDashboards.spec.tsx @@ -6,6 +6,7 @@ import {initializeOrg} from 'sentry-test/initializeOrg'; import {render, screen, waitFor} from 'sentry-test/reactTestingLibrary'; import ProjectsStore from 'sentry/stores/projectsStore'; +import type {RouteComponentProps} from 'sentry/types/legacyReactRouter'; import DashboardDetail from 'sentry/views/dashboards/detail'; import OrgDashboards from 'sentry/views/dashboards/orgDashboards'; import {DashboardState} from 'sentry/views/dashboards/types'; @@ -85,7 +86,7 @@ describe('OrgDashboards', () => { initialState={DashboardState.VIEW} dashboard={dashboard} dashboards={dashboards} - {...initialData.routerProps} + {...(initialData.routerProps as RouteComponentProps)} /> ) : (

loading
@@ -148,7 +149,7 @@ describe('OrgDashboards', () => { initialState={DashboardState.VIEW} dashboard={dashboard} dashboards={dashboards} - {...initialData.routerProps} + {...(initialData.routerProps as RouteComponentProps)} /> ) : (
loading
@@ -220,7 +221,7 @@ describe('OrgDashboards', () => { initialState={DashboardState.VIEW} dashboard={dashboard} dashboards={dashboards} - {...initialData.routerProps} + {...(initialData.routerProps as RouteComponentProps)} /> ) : (
loading
@@ -249,7 +250,7 @@ describe('OrgDashboards', () => { initialState={DashboardState.VIEW} dashboard={dashboard} dashboards={dashboards} - {...initialData.routerProps} + {...(initialData.routerProps as RouteComponentProps)} /> ) : (
loading
@@ -295,7 +296,7 @@ describe('OrgDashboards', () => { initialState={DashboardState.VIEW} dashboard={dashboard} dashboards={dashboards} - {...initialData.routerProps} + {...(initialData.routerProps as RouteComponentProps)} /> ) : (
loading
@@ -316,7 +317,7 @@ describe('OrgDashboards', () => { initialState={DashboardState.VIEW} dashboard={dashboard} dashboards={dashboards} - {...initialData.routerProps} + {...(initialData.routerProps as RouteComponentProps)} /> ) : (
loading
diff --git a/static/app/views/dashboards/view.tsx b/static/app/views/dashboards/view.tsx index 9f9257d53a6004..bcef6b2b53c64e 100644 --- a/static/app/views/dashboards/view.tsx +++ b/static/app/views/dashboards/view.tsx @@ -31,10 +31,11 @@ const ALLOWED_PARAMS = [ 'statsPeriod', ]; -type Props = RouteComponentProps< - {dashboardId: string; orgId: string; widgetId?: number}, - {} -> & { +type Props = RouteComponentProps<{ + dashboardId: string; + orgId: string; + widgetId?: number | string; +}> & { children: React.ReactNode; organization: Organization; }; diff --git a/static/app/views/dashboards/widgetBuilder/widgetBuilder.tsx b/static/app/views/dashboards/widgetBuilder/widgetBuilder.tsx index 2b6c0af12a55f4..bee6159281641b 100644 --- a/static/app/views/dashboards/widgetBuilder/widgetBuilder.tsx +++ b/static/app/views/dashboards/widgetBuilder/widgetBuilder.tsx @@ -140,7 +140,7 @@ interface QueryData { queryOrderby: string; } -interface Props extends RouteComponentProps { +interface Props extends RouteComponentProps { dashboard: DashboardDetails; onSave: (widgets: Widget[]) => void; selection: PageFilters; diff --git a/static/app/views/dataExport/dataDownload.tsx b/static/app/views/dataExport/dataDownload.tsx index c6792c6dc172c6..22d6b0a6a3ea74 100644 --- a/static/app/views/dataExport/dataDownload.tsx +++ b/static/app/views/dataExport/dataDownload.tsx @@ -44,7 +44,7 @@ type Download = { dateFinished?: string; }; -type Props = {} & RouteComponentProps; +type Props = {} & RouteComponentProps; function DataDownload({params: {orgId, dataExportId}}: Props) { const { diff --git a/static/app/views/discover/eventDetails/content.tsx b/static/app/views/discover/eventDetails/content.tsx index 69eba6db3386e8..744a17e151b0b0 100644 --- a/static/app/views/discover/eventDetails/content.tsx +++ b/static/app/views/discover/eventDetails/content.tsx @@ -53,7 +53,7 @@ import {generateTitle, getExpandedResults} from '../utils'; import LinkedIssue from './linkedIssue'; -type Props = Pick, 'params' | 'location'> & { +type Props = Pick, 'params' | 'location'> & { eventSlug: string; eventView: EventView; organization: Organization; diff --git a/static/app/views/discover/eventDetails/index.tsx b/static/app/views/discover/eventDetails/index.tsx index 6e21fa9edafc99..833871dae773a3 100644 --- a/static/app/views/discover/eventDetails/index.tsx +++ b/static/app/views/discover/eventDetails/index.tsx @@ -11,7 +11,7 @@ import withOrganization from 'sentry/utils/withOrganization'; import EventDetailsContent from './content'; -type Props = RouteComponentProps<{eventSlug: string}, {}> & { +type Props = RouteComponentProps<{eventSlug: string}> & { organization: Organization; }; diff --git a/static/app/views/discover/landing.tsx b/static/app/views/discover/landing.tsx index 430c1daf10dfc3..8d3922c783ba89 100644 --- a/static/app/views/discover/landing.tsx +++ b/static/app/views/discover/landing.tsx @@ -42,7 +42,7 @@ const SORT_OPTIONS: Array> = [ type Props = { organization: Organization; -} & RouteComponentProps<{}, {}> & +} & RouteComponentProps & DeprecatedAsyncComponent['props']; type State = { diff --git a/static/app/views/feedback/index.tsx b/static/app/views/feedback/index.tsx index b75405f29bb9ce..47ed247f3e8e4f 100644 --- a/static/app/views/feedback/index.tsx +++ b/static/app/views/feedback/index.tsx @@ -9,7 +9,7 @@ import {t} from 'sentry/locale'; import type {RouteComponentProps} from 'sentry/types/legacyReactRouter'; import useOrganization from 'sentry/utils/useOrganization'; -type Props = RouteComponentProps<{}, {}> & { +type Props = RouteComponentProps & { children: React.ReactNode; }; diff --git a/static/app/views/insights/database/views/databaseSpanSummaryPage.spec.tsx b/static/app/views/insights/database/views/databaseSpanSummaryPage.spec.tsx index 14b111c87420e2..3062081e9c43e6 100644 --- a/static/app/views/insights/database/views/databaseSpanSummaryPage.spec.tsx +++ b/static/app/views/insights/database/views/databaseSpanSummaryPage.spec.tsx @@ -151,9 +151,6 @@ describe('DatabaseSpanSummaryPage', function () { {...RouteComponentPropsFixture()} params={{ groupId: '1756baf8fd19c116', - transaction: '', - transactionMethod: '', - transactionsSort: '', }} />, {organization} diff --git a/static/app/views/insights/database/views/databaseSpanSummaryPage.tsx b/static/app/views/insights/database/views/databaseSpanSummaryPage.tsx index 3be8d93c96eedc..d2fb327969f054 100644 --- a/static/app/views/insights/database/views/databaseSpanSummaryPage.tsx +++ b/static/app/views/insights/database/views/databaseSpanSummaryPage.tsx @@ -56,7 +56,7 @@ type Query = { aggregate?: string; }; -type Props = RouteComponentProps; +type Props = RouteComponentProps<{groupId: string}, Record, any, Query>; export function DatabaseSpanSummaryPage({params}: Props) { const location = useLocation(); diff --git a/static/app/views/integrationOrganizationLink/index.tsx b/static/app/views/integrationOrganizationLink/index.tsx index 8a9cff9c9132bb..8f09b1c8706669 100644 --- a/static/app/views/integrationOrganizationLink/index.tsx +++ b/static/app/views/integrationOrganizationLink/index.tsx @@ -29,7 +29,7 @@ import {DisabledNotice} from 'sentry/views/settings/organizationIntegrations/abs import AddIntegration from 'sentry/views/settings/organizationIntegrations/addIntegration'; // installationId present for Github flow -type Props = RouteComponentProps<{integrationSlug: string; installationId?: string}, {}>; +type Props = RouteComponentProps<{integrationSlug: string; installationId?: string}>; type State = DeprecatedAsyncComponent['state'] & { installationData?: GitHubIntegrationInstallation; diff --git a/static/app/views/issueDetails/groupDetails.tsx b/static/app/views/issueDetails/groupDetails.tsx index a8a42db7bff7a4..8180463dce1906 100644 --- a/static/app/views/issueDetails/groupDetails.tsx +++ b/static/app/views/issueDetails/groupDetails.tsx @@ -74,9 +74,9 @@ import { type Error = (typeof ERROR_TYPES)[keyof typeof ERROR_TYPES] | null; type RouterParams = {groupId: string; eventId?: string}; -type RouteProps = RouteComponentProps; +type RouteProps = RouteComponentProps; -interface GroupDetailsProps extends RouteComponentProps<{groupId: string}, {}> { +interface GroupDetailsProps extends RouteComponentProps<{groupId: string}> { children: React.ReactNode; } diff --git a/static/app/views/issueDetails/useGroupDetailsRoute.tsx b/static/app/views/issueDetails/useGroupDetailsRoute.tsx index 2fc989fdd6177a..d4e69ecc3040a6 100644 --- a/static/app/views/issueDetails/useGroupDetailsRoute.tsx +++ b/static/app/views/issueDetails/useGroupDetailsRoute.tsx @@ -6,7 +6,7 @@ import {useParams} from 'sentry/utils/useParams'; import useRouter from 'sentry/utils/useRouter'; import {Tab, TabPaths} from 'sentry/views/issueDetails/types'; -type RouteProps = RouteComponentProps<{groupId: string; eventId?: string}, {}>; +type RouteProps = RouteComponentProps<{groupId: string; eventId?: string}>; function getCurrentTab({router}: {router: RouteProps['router']}) { const currentRoute = router.routes[router.routes.length - 1]; diff --git a/static/app/views/issueList/overview.spec.tsx b/static/app/views/issueList/overview.spec.tsx index 95682f7112ba01..26f3977afcf9bb 100644 --- a/static/app/views/issueList/overview.spec.tsx +++ b/static/app/views/issueList/overview.spec.tsx @@ -62,7 +62,7 @@ const {organization, projects, router} = initializeOrg({ const routerProps = { params: router.params, location: router.location, -} as RouteComponentProps<{}, {searchId?: string}>; +} as RouteComponentProps, {searchId?: string}>; const initialRouterConfig = { routes: [ diff --git a/static/app/views/issueList/overview.tsx b/static/app/views/issueList/overview.tsx index 3bb1174f0f855a..d270328713f4e3 100644 --- a/static/app/views/issueList/overview.tsx +++ b/static/app/views/issueList/overview.tsx @@ -79,7 +79,10 @@ const DEFAULT_GRAPH_STATS_PERIOD = '24h'; const DYNAMIC_COUNTS_STATS_PERIODS = new Set(['14d', '24h', 'auto']); const MAX_ISSUES_COUNT = 100; -type Props = RouteComponentProps<{}, {searchId?: string}>; +type Props = RouteComponentProps< + Record, + {searchId?: string} +>; interface EndpointParams extends Partial { environment: string[]; diff --git a/static/app/views/issueList/overviewWrapper.tsx b/static/app/views/issueList/overviewWrapper.tsx index a73e2a9ec6cd8b..5e03f6a209a3c7 100644 --- a/static/app/views/issueList/overviewWrapper.tsx +++ b/static/app/views/issueList/overviewWrapper.tsx @@ -2,7 +2,10 @@ import type {RouteComponentProps} from 'sentry/types/legacyReactRouter'; import IssueListContainer from 'sentry/views/issueList'; import IssueListOverview from 'sentry/views/issueList/overview'; -type OverviewWrapperProps = RouteComponentProps<{}, {searchId?: string}>; +type OverviewWrapperProps = RouteComponentProps< + Record, + {searchId?: string} +>; export function OverviewWrapper(props: OverviewWrapperProps) { return ( diff --git a/static/app/views/issues/navigation.tsx b/static/app/views/issues/navigation.tsx index 5da823a0d79849..1e1bf7bd87a3ac 100644 --- a/static/app/views/issues/navigation.tsx +++ b/static/app/views/issues/navigation.tsx @@ -6,7 +6,7 @@ import {t} from 'sentry/locale'; import type {RouteComponentProps} from 'sentry/types/legacyReactRouter'; import useOrganization from 'sentry/utils/useOrganization'; -interface IssuesWrapperProps extends RouteComponentProps<{}, {}> { +interface IssuesWrapperProps extends RouteComponentProps { children: React.ReactNode; } diff --git a/static/app/views/monitors/details.tsx b/static/app/views/monitors/details.tsx index dc9090060a33e7..89df1cb4483891 100644 --- a/static/app/views/monitors/details.tsx +++ b/static/app/views/monitors/details.tsx @@ -41,7 +41,7 @@ import {makeMonitorDetailsQueryKey} from './utils'; const DEFAULT_POLL_INTERVAL_MS = 5000; -type Props = RouteComponentProps<{monitorSlug: string; projectId: string}, {}>; +type Props = RouteComponentProps<{monitorSlug: string; projectId: string}>; function hasLastCheckIn(monitor: Monitor) { return monitor.environments.some(e => e.lastCheckIn); diff --git a/static/app/views/onboarding/index.tsx b/static/app/views/onboarding/index.tsx index 889ea693ae8cf9..49c2423fbd94f9 100644 --- a/static/app/views/onboarding/index.tsx +++ b/static/app/views/onboarding/index.tsx @@ -2,7 +2,7 @@ import type {RouteComponentProps} from 'sentry/types/legacyReactRouter'; import Onboarding from './onboarding'; -type Props = RouteComponentProps<{step: string}, {}>; +type Props = RouteComponentProps<{step: string}>; export default function OnboardingContainer(props: Props) { return ; diff --git a/static/app/views/onboarding/onboarding.tsx b/static/app/views/onboarding/onboarding.tsx index 8265b0b5e9e46a..4fcc8020563bc8 100644 --- a/static/app/views/onboarding/onboarding.tsx +++ b/static/app/views/onboarding/onboarding.tsx @@ -42,7 +42,7 @@ type RouteParams = { step: string; }; -type Props = RouteComponentProps; +type Props = RouteComponentProps; function getOrganizationOnboardingSteps(): StepDescriptor[] { return [ diff --git a/static/app/views/onboarding/types.ts b/static/app/views/onboarding/types.ts index 6abb8ea15e72fa..28df1577f0b3f4 100644 --- a/static/app/views/onboarding/types.ts +++ b/static/app/views/onboarding/types.ts @@ -9,10 +9,7 @@ export type StepData = { }; // Not sure if we need platform info to be passed down -export type StepProps = Pick< - RouteComponentProps<{}, {}>, - 'router' | 'route' | 'location' -> & { +export type StepProps = Pick & { active: boolean; genSkipOnboardingLink: () => React.ReactNode; onComplete: (selectedPlatforms?: OnboardingSelectedSDK) => void; diff --git a/static/app/views/organizationJoinRequest/index.tsx b/static/app/views/organizationJoinRequest/index.tsx index bedd1e812c3974..30b31d82bae74a 100644 --- a/static/app/views/organizationJoinRequest/index.tsx +++ b/static/app/views/organizationJoinRequest/index.tsx @@ -11,7 +11,7 @@ import {space} from 'sentry/styles/space'; import type {RouteComponentProps} from 'sentry/types/legacyReactRouter'; import {trackAnalytics} from 'sentry/utils/analytics'; -type Props = RouteComponentProps<{orgId: string}, {}>; +type Props = RouteComponentProps<{orgId: string}>; type State = { submitSuccess: boolean | null; diff --git a/static/app/views/organizationRestore/index.tsx b/static/app/views/organizationRestore/index.tsx index 8e29fefcfc039a..4f710a82d39c4c 100644 --- a/static/app/views/organizationRestore/index.tsx +++ b/static/app/views/organizationRestore/index.tsx @@ -18,7 +18,7 @@ import {useApiQuery} from 'sentry/utils/queryClient'; import normalizeUrl from 'sentry/utils/url/normalizeUrl'; import {useParams} from 'sentry/utils/useParams'; -type Props = RouteComponentProps<{orgId: string}, {}>; +type Props = RouteComponentProps<{orgId: string}>; function OrganizationRestore(_props: Props) { const params = useParams<{orgId: string}>(); diff --git a/static/app/views/organizationStats/index.tsx b/static/app/views/organizationStats/index.tsx index 5aaa2a72a6393e..7b9e21cf37f57c 100644 --- a/static/app/views/organizationStats/index.tsx +++ b/static/app/views/organizationStats/index.tsx @@ -66,7 +66,7 @@ export const PAGE_QUERY_PARAMS = [ export type OrganizationStatsProps = { organization: Organization; selection: PageFilters; -} & RouteComponentProps<{}, {}>; +} & RouteComponentProps; export class OrganizationStats extends Component { get dataCategoryInfo(): DataCategoryInfo { diff --git a/static/app/views/organizationStats/teamInsights/controls.tsx b/static/app/views/organizationStats/teamInsights/controls.tsx index a46eb84870eb47..bde006582ac3fb 100644 --- a/static/app/views/organizationStats/teamInsights/controls.tsx +++ b/static/app/views/organizationStats/teamInsights/controls.tsx @@ -44,7 +44,7 @@ const PAGE_QUERY_PARAMS = [ 'environment', ]; -type Props = Pick, 'router' | 'location'> & { +type Props = Pick & { currentEnvironment?: string; currentTeam?: TeamWithProjects; showEnvironment?: boolean; diff --git a/static/app/views/organizationStats/teamInsights/health.tsx b/static/app/views/organizationStats/teamInsights/health.tsx index 363b0d35bb06d7..e04ed9c4e2a708 100644 --- a/static/app/views/organizationStats/teamInsights/health.tsx +++ b/static/app/views/organizationStats/teamInsights/health.tsx @@ -24,7 +24,7 @@ import TeamReleases from './teamReleases'; import TeamStability from './teamStability'; import {dataDatetime} from './utils'; -type Props = RouteComponentProps<{}, {}>; +type Props = RouteComponentProps; function TeamStatsHealth({location, router}: Props) { const organization = useOrganization(); diff --git a/static/app/views/organizationStats/teamInsights/issues.tsx b/static/app/views/organizationStats/teamInsights/issues.tsx index 560e2b723be64d..98c0c06e24a2c1 100644 --- a/static/app/views/organizationStats/teamInsights/issues.tsx +++ b/static/app/views/organizationStats/teamInsights/issues.tsx @@ -24,7 +24,7 @@ import TeamResolutionTime from './teamResolutionTime'; import {TeamUnresolvedIssues} from './teamUnresolvedIssues'; import {dataDatetime} from './utils'; -type Props = RouteComponentProps<{}, {}>; +type Props = RouteComponentProps; function TeamStatsIssues({location, router}: Props) { const organization = useOrganization(); diff --git a/static/app/views/performance/traceDetails/content.tsx b/static/app/views/performance/traceDetails/content.tsx index ee4289e6ac363c..7050be640ddc5e 100644 --- a/static/app/views/performance/traceDetails/content.tsx +++ b/static/app/views/performance/traceDetails/content.tsx @@ -56,7 +56,7 @@ type IndexedFusedTransaction = { indexed: string[]; }; -type Props = Pick, 'params' | 'location'> & { +type Props = Pick, 'params' | 'location'> & { dateSelected: boolean; error: QueryError | null; isLoading: boolean; diff --git a/static/app/views/performance/traceDetails/index.tsx b/static/app/views/performance/traceDetails/index.tsx index 8d791ddc66ddd0..9d305a42b2a93f 100644 --- a/static/app/views/performance/traceDetails/index.tsx +++ b/static/app/views/performance/traceDetails/index.tsx @@ -28,7 +28,7 @@ import {DEFAULT_TRACE_ROWS_LIMIT} from './limitExceededMessage'; import NewTraceDetailsContent from './newTraceDetailsContent'; import {getTraceSplitResults} from './utils'; -type Props = RouteComponentProps<{traceSlug: string}, {}> & { +type Props = RouteComponentProps<{traceSlug: string}> & { api: Client; organization: Organization; }; diff --git a/static/app/views/performance/traceDetails/newTraceDetailsContent.tsx b/static/app/views/performance/traceDetails/newTraceDetailsContent.tsx index afc5e4b51d5e87..909ea8dddea6da 100644 --- a/static/app/views/performance/traceDetails/newTraceDetailsContent.tsx +++ b/static/app/views/performance/traceDetails/newTraceDetailsContent.tsx @@ -50,7 +50,7 @@ import TraceNotFound from './traceNotFound'; import TraceViewDetailPanel from './traceViewDetailPanel'; import {getTraceInfo, hasTraceData, isRootTransaction} from './utils'; -type Props = Pick, 'params' | 'location'> & { +type Props = Pick, 'params' | 'location'> & { dateSelected: boolean; error: QueryError | null; isLoading: boolean; diff --git a/static/app/views/performance/traceDetails/newTraceDetailsTraceView.tsx b/static/app/views/performance/traceDetails/newTraceDetailsTraceView.tsx index 4430303a5c58e9..8d26100332b8df 100644 --- a/static/app/views/performance/traceDetails/newTraceDetailsTraceView.tsx +++ b/static/app/views/performance/traceDetails/newTraceDetailsTraceView.tsx @@ -59,7 +59,7 @@ type AccType = { renderedChildren: React.ReactNode[]; }; -type Props = Pick, 'location'> & { +type Props = Pick & { meta: TraceMeta | null; onRowClick: (detailKey: EventDetail | SpanDetailProps | undefined) => void; organization: Organization; diff --git a/static/app/views/performance/traceDetails/traceView.tsx b/static/app/views/performance/traceDetails/traceView.tsx index f5e2f2710f4a2a..8b1974679085da 100644 --- a/static/app/views/performance/traceDetails/traceView.tsx +++ b/static/app/views/performance/traceDetails/traceView.tsx @@ -52,7 +52,7 @@ type AccType = { renderedChildren: React.ReactNode[]; }; -type TraceViewProps = Pick, 'location'> & { +type TraceViewProps = Pick & { meta: TraceMeta | null; organization: Organization; traceEventView: EventView; diff --git a/static/app/views/performance/transactionDetails/content.tsx b/static/app/views/performance/transactionDetails/content.tsx index 6b2a5ee72dcee4..58591683b4e1e1 100644 --- a/static/app/views/performance/transactionDetails/content.tsx +++ b/static/app/views/performance/transactionDetails/content.tsx @@ -54,7 +54,7 @@ import {getSelectedProjectPlatforms} from '../utils'; import EventMetas from './eventMetas'; import FinishSetupAlert from './finishSetupAlert'; -type Props = Pick, 'params' | 'location'> & +type Props = Pick, 'params' | 'location'> & WithRouteAnalyticsProps & { eventSlug: string; organization: Organization; diff --git a/static/app/views/performance/transactionDetails/index.tsx b/static/app/views/performance/transactionDetails/index.tsx index 0210557bc4643b..66650080679dd6 100644 --- a/static/app/views/performance/transactionDetails/index.tsx +++ b/static/app/views/performance/transactionDetails/index.tsx @@ -8,7 +8,7 @@ import withOrganization from 'sentry/utils/withOrganization'; import EventDetailsContent from './content'; -type Props = RouteComponentProps<{}, {eventSlug: string}> & { +type Props = RouteComponentProps<{eventSlug: string}> & { organization: Organization; }; diff --git a/static/app/views/performance/transactionSummary/transactionOverview/content.spec.tsx b/static/app/views/performance/transactionSummary/transactionOverview/content.spec.tsx index dcfe5823fe31b6..a130f63c728659 100644 --- a/static/app/views/performance/transactionSummary/transactionOverview/content.spec.tsx +++ b/static/app/views/performance/transactionSummary/transactionOverview/content.spec.tsx @@ -64,7 +64,7 @@ function WrappedComponent({ organization, ...props }: React.ComponentProps & { - router: InjectedRouter, any>; + router: InjectedRouter; }) { return ( diff --git a/static/app/views/performance/transactionSummary/transactionOverview/index.spec.tsx b/static/app/views/performance/transactionSummary/transactionOverview/index.spec.tsx index 81d6f331a75bb8..c7111f71e55bdd 100644 --- a/static/app/views/performance/transactionSummary/transactionOverview/index.spec.tsx +++ b/static/app/views/performance/transactionSummary/transactionOverview/index.spec.tsx @@ -71,7 +71,7 @@ function initializeData({ function TestComponent({ ...props }: React.ComponentProps & { - router: InjectedRouter, any>; + router: InjectedRouter; }) { if (!props.organization) { throw new Error('Missing organization'); diff --git a/static/app/views/performance/transactionSummary/transactionSpans/spanDetails/index.tsx b/static/app/views/performance/transactionSummary/transactionSpans/spanDetails/index.tsx index 2570e3a44e35cc..7cc28d04debc4d 100644 --- a/static/app/views/performance/transactionSummary/transactionSpans/spanDetails/index.tsx +++ b/static/app/views/performance/transactionSummary/transactionSpans/spanDetails/index.tsx @@ -15,7 +15,7 @@ import {generateSpansEventView, parseSpanSlug} from '../utils'; import SpanDetailsContent from './content'; -type Props = Pick, 'location' | 'params'>; +type Props = Pick, 'location' | 'params'>; export default function SpanDetails(props: Props) { const {location, params} = props; diff --git a/static/app/views/performance/vitalDetail/index.tsx b/static/app/views/performance/vitalDetail/index.tsx index be61d66e307f5a..da0f509d3544de 100644 --- a/static/app/views/performance/vitalDetail/index.tsx +++ b/static/app/views/performance/vitalDetail/index.tsx @@ -33,7 +33,7 @@ import { import VitalDetailContent from './vitalDetailContent'; -type Props = RouteComponentProps<{}, {}> & { +type Props = RouteComponentProps & { api: Client; loadingProjects: boolean; organization: Organization; diff --git a/static/app/views/projectDetail/projectDetail.tsx b/static/app/views/projectDetail/projectDetail.tsx index b83994f3ff6ec2..eca79f5e943c41 100644 --- a/static/app/views/projectDetail/projectDetail.tsx +++ b/static/app/views/projectDetail/projectDetail.tsx @@ -48,7 +48,7 @@ type RouteParams = { projectId: string; }; -type Props = RouteComponentProps & { +type Props = RouteComponentProps & { organization: Organization; }; diff --git a/static/app/views/projectEventRedirect.tsx b/static/app/views/projectEventRedirect.tsx index 937a143feafd62..24bfa3ef59c8da 100644 --- a/static/app/views/projectEventRedirect.tsx +++ b/static/app/views/projectEventRedirect.tsx @@ -6,7 +6,7 @@ import {t} from 'sentry/locale'; import type {RouteComponentProps} from 'sentry/types/legacyReactRouter'; import {useParams} from 'sentry/utils/useParams'; -type Props = RouteComponentProps<{}, {}>; +type Props = RouteComponentProps; /** * This component performs a client-side redirect to Event Details given only diff --git a/static/app/views/projectInstall/platformOrIntegration.tsx b/static/app/views/projectInstall/platformOrIntegration.tsx index 117a661e2f7634..7ea6645514ed79 100644 --- a/static/app/views/projectInstall/platformOrIntegration.tsx +++ b/static/app/views/projectInstall/platformOrIntegration.tsx @@ -11,7 +11,7 @@ import GettingStarted from './gettingStarted'; import {ProjectInstallPlatform} from './platform'; import {PlatformIntegrationSetup} from './platformIntegrationSetup'; -type Props = RouteComponentProps<{projectId: string}, {}>; +type Props = RouteComponentProps<{projectId: string}>; function PlatformOrIntegration({params}: Props) { const organization = useOrganization(); diff --git a/static/app/views/projects/redirectDeprecatedProjectRoute.tsx b/static/app/views/projects/redirectDeprecatedProjectRoute.tsx index e4ff01deec40f4..f67a14e15503ac 100644 --- a/static/app/views/projects/redirectDeprecatedProjectRoute.tsx +++ b/static/app/views/projects/redirectDeprecatedProjectRoute.tsx @@ -106,7 +106,7 @@ const ProjectDetails = withApi(ProjectDetailsInner); type Params = {orgId: string; projectId: string} & Record; -type Props = RouteComponentProps; +type Props = RouteComponentProps; type RedirectOptions = { orgId: string; diff --git a/static/app/views/releases/detail/index.tsx b/static/app/views/releases/detail/index.tsx index 0e89d221077049..3995be0869be5a 100644 --- a/static/app/views/releases/detail/index.tsx +++ b/static/app/views/releases/detail/index.tsx @@ -56,7 +56,7 @@ type RouteParams = { release: string; }; -type Props = RouteComponentProps & +type Props = RouteComponentProps & WithRouteAnalyticsProps & { children: React.ReactNode; organization: Organization; diff --git a/static/app/views/releases/detail/overview/index.tsx b/static/app/views/releases/detail/overview/index.tsx index 72107d48346403..a9b2dafab514fd 100644 --- a/static/app/views/releases/detail/overview/index.tsx +++ b/static/app/views/releases/detail/overview/index.tsx @@ -78,7 +78,7 @@ type RouteParams = { release: string; }; -type Props = RouteComponentProps & { +type Props = RouteComponentProps & { api: Client; organization: Organization; selection: PageFilters; diff --git a/static/app/views/releases/index.tsx b/static/app/views/releases/index.tsx index 2d15857b30d53e..80f036f9f05023 100644 --- a/static/app/views/releases/index.tsx +++ b/static/app/views/releases/index.tsx @@ -2,7 +2,7 @@ import {useRedirectNavV2Routes} from 'sentry/components/nav/useRedirectNavV2Rout import Redirect from 'sentry/components/redirect'; import type {RouteComponentProps} from 'sentry/types/legacyReactRouter'; -type Props = RouteComponentProps<{}, {}> & { +type Props = RouteComponentProps & { children: React.ReactNode; }; diff --git a/static/app/views/releases/list/index.tsx b/static/app/views/releases/list/index.tsx index 0d163a4d1d1a20..1337a0ded16f79 100644 --- a/static/app/views/releases/list/index.tsx +++ b/static/app/views/releases/list/index.tsx @@ -64,7 +64,7 @@ type RouteParams = { orgId: string; }; -type Props = RouteComponentProps & { +type Props = RouteComponentProps & { api: Client; organization: Organization; projects: Project[]; diff --git a/static/app/views/relocation/index.tsx b/static/app/views/relocation/index.tsx index c7dcf0feee7e74..f4a0f8b29ae2aa 100644 --- a/static/app/views/relocation/index.tsx +++ b/static/app/views/relocation/index.tsx @@ -6,7 +6,7 @@ import type {RouteComponentProps} from 'sentry/types/legacyReactRouter'; import RelocationOnboarding from './relocation'; -type Props = RouteComponentProps<{step: string}, {}>; +type Props = RouteComponentProps<{step: string}>; export default function RelocationOnboardingContainer(props: Props) { return ( diff --git a/static/app/views/relocation/relocation.tsx b/static/app/views/relocation/relocation.tsx index e8c12abe7af4e4..ef2c9b513413f1 100644 --- a/static/app/views/relocation/relocation.tsx +++ b/static/app/views/relocation/relocation.tsx @@ -34,7 +34,7 @@ type RouteParams = { step: string; }; -type Props = RouteComponentProps; +type Props = RouteComponentProps; function getRelocationOnboardingSteps(): StepDescriptor[] { return [ diff --git a/static/app/views/relocation/types.ts b/static/app/views/relocation/types.ts index ce461b45720341..0666155376a7cd 100644 --- a/static/app/views/relocation/types.ts +++ b/static/app/views/relocation/types.ts @@ -12,10 +12,7 @@ export type MaybeUpdateRelocationState = { regionUrl?: string; }; -export type StepProps = Pick< - RouteComponentProps<{}, {}>, - 'router' | 'route' | 'location' -> & { +export type StepProps = Pick & { active: boolean; existingRelocationUUID: string; onComplete: (uuid?: string) => void; diff --git a/static/app/views/replays/details.tsx b/static/app/views/replays/details.tsx index 318baa42f8ee3a..ce9ce667e3c995 100644 --- a/static/app/views/replays/details.tsx +++ b/static/app/views/replays/details.tsx @@ -32,7 +32,6 @@ import ReplayTransactionContext from 'sentry/views/replays/detail/trace/replayTr type Props = RouteComponentProps< {replaySlug: string}, - {}, any, TimeOffsetLocationQueryParams >; diff --git a/static/app/views/replays/index.tsx b/static/app/views/replays/index.tsx index 1806c720d3d939..95e31f2e7e73d6 100644 --- a/static/app/views/replays/index.tsx +++ b/static/app/views/replays/index.tsx @@ -4,7 +4,7 @@ import Redirect from 'sentry/components/redirect'; import type {RouteComponentProps} from 'sentry/types/legacyReactRouter'; import useOrganization from 'sentry/utils/useOrganization'; -type Props = RouteComponentProps<{}, {}> & { +type Props = RouteComponentProps & { children: React.ReactNode; }; diff --git a/static/app/views/routeNotFound.tsx b/static/app/views/routeNotFound.tsx index 5534e947f72239..799ec20e5f66f1 100644 --- a/static/app/views/routeNotFound.tsx +++ b/static/app/views/routeNotFound.tsx @@ -10,7 +10,7 @@ import {t} from 'sentry/locale'; import type {RouteComponentProps} from 'sentry/types/legacyReactRouter'; import {useLastKnownRoute} from 'sentry/views/lastKnownRouteContextProvider'; -type Props = RouteComponentProps<{}, {}>; +type Props = RouteComponentProps; function RouteNotFound({router, location}: Props) { const {pathname, search, hash} = location; diff --git a/static/app/views/sentryAppExternalInstallation/index.tsx b/static/app/views/sentryAppExternalInstallation/index.tsx index 1b3a5b17408362..aa8e9cd789cb7a 100644 --- a/static/app/views/sentryAppExternalInstallation/index.tsx +++ b/static/app/views/sentryAppExternalInstallation/index.tsx @@ -24,7 +24,7 @@ import useApi from 'sentry/utils/useApi'; import {OrganizationContext} from '../organizationContext'; -type Props = RouteComponentProps<{sentryAppSlug: string}, {}>; +type Props = RouteComponentProps<{sentryAppSlug: string}>; // Page Layout export default function SentryAppExternalInstallation(props: Props) { diff --git a/static/app/views/settings/account/accountNotificationFineTuningController.tsx b/static/app/views/settings/account/accountNotificationFineTuningController.tsx index a663c761a735bc..34705f5737244b 100644 --- a/static/app/views/settings/account/accountNotificationFineTuningController.tsx +++ b/static/app/views/settings/account/accountNotificationFineTuningController.tsx @@ -6,7 +6,7 @@ import withOrganizations from 'sentry/utils/withOrganizations'; import AccountNotificationFineTuning from './accountNotificationFineTuning'; interface AccountNotificationFineTuningControllerProps - extends RouteComponentProps<{fineTuneType: string}, {}> { + extends RouteComponentProps<{fineTuneType: string}> { organizations: Organization[]; organizationsLoading?: boolean; } diff --git a/static/app/views/settings/account/accountSecurity/index.tsx b/static/app/views/settings/account/accountSecurity/index.tsx index d98a8f0e43be32..303e7698ab0405 100644 --- a/static/app/views/settings/account/accountSecurity/index.tsx +++ b/static/app/views/settings/account/accountSecurity/index.tsx @@ -37,7 +37,7 @@ type Props = { hasVerifiedEmail: boolean; onDisable: (auth: Authenticator) => void; orgsRequire2fa: OrganizationSummary[]; -} & RouteComponentProps<{}, {}>; +} & RouteComponentProps; /** * Lists 2fa devices + password change form diff --git a/static/app/views/settings/account/accountSecurity/sessionHistory/index.tsx b/static/app/views/settings/account/accountSecurity/sessionHistory/index.tsx index 1fdba3b218f7bb..c42ed7684f2781 100644 --- a/static/app/views/settings/account/accountSecurity/sessionHistory/index.tsx +++ b/static/app/views/settings/account/accountSecurity/sessionHistory/index.tsx @@ -18,7 +18,7 @@ import SettingsPageHeader from 'sentry/views/settings/components/settingsPageHea import SessionRow from './sessionRow'; import {tableLayout} from './utils'; -type Props = RouteComponentProps<{}, {}>; +type Props = RouteComponentProps; type IpListType = InternetProtocol[] | null; diff --git a/static/app/views/settings/account/apiApplications/index.tsx b/static/app/views/settings/account/apiApplications/index.tsx index cc253243d8c6cc..efe6ac95e78a5c 100644 --- a/static/app/views/settings/account/apiApplications/index.tsx +++ b/static/app/views/settings/account/apiApplications/index.tsx @@ -22,7 +22,7 @@ import SettingsPageHeader from 'sentry/views/settings/components/settingsPageHea const ROUTE_PREFIX = '/settings/account/api/'; -type Props = RouteComponentProps<{}, {}>; +type Props = RouteComponentProps; function ApiApplications({router}: Props) { const api = useApi(); diff --git a/static/app/views/settings/account/notifications/notificationSettingsController.tsx b/static/app/views/settings/account/notifications/notificationSettingsController.tsx index dfd557e0b66d44..c3a6bfde83db38 100644 --- a/static/app/views/settings/account/notifications/notificationSettingsController.tsx +++ b/static/app/views/settings/account/notifications/notificationSettingsController.tsx @@ -5,7 +5,7 @@ import withOrganizations from 'sentry/utils/withOrganizations'; import NotificationSettings from './notificationSettings'; -interface NotificationSettingsControllerProps extends RouteComponentProps<{}, {}> { +interface NotificationSettingsControllerProps extends RouteComponentProps { organizations: Organization[]; organizationsLoading?: boolean; } diff --git a/static/app/views/settings/components/settingsBreadcrumb/organizationCrumb.tsx b/static/app/views/settings/components/settingsBreadcrumb/organizationCrumb.tsx index b7519122b0ce1d..b28f1b81a0a52f 100644 --- a/static/app/views/settings/components/settingsBreadcrumb/organizationCrumb.tsx +++ b/static/app/views/settings/components/settingsBreadcrumb/organizationCrumb.tsx @@ -16,7 +16,7 @@ import findFirstRouteWithoutRouteParam from './findFirstRouteWithoutRouteParam'; import MenuItem from './menuItem'; import {CrumbLink} from '.'; -type Props = RouteComponentProps<{projectId?: string}, {}>; +type Props = RouteComponentProps<{projectId?: string}>; function OrganizationCrumb({params, routes, route, ...props}: Props) { const navigate = useNavigate(); diff --git a/static/app/views/settings/components/settingsBreadcrumb/projectCrumb.tsx b/static/app/views/settings/components/settingsBreadcrumb/projectCrumb.tsx index 424da5c85e02bc..a4a4f115ac2d86 100644 --- a/static/app/views/settings/components/settingsBreadcrumb/projectCrumb.tsx +++ b/static/app/views/settings/components/settingsBreadcrumb/projectCrumb.tsx @@ -17,7 +17,7 @@ import findFirstRouteWithoutRouteParam from './findFirstRouteWithoutRouteParam'; import MenuItem from './menuItem'; import {CrumbLink} from '.'; -type Props = RouteComponentProps<{projectId?: string}, {}> & { +type Props = RouteComponentProps<{projectId?: string}> & { organization: Organization; project: Project; projects: Project[]; diff --git a/static/app/views/settings/components/settingsBreadcrumb/teamCrumb.tsx b/static/app/views/settings/components/settingsBreadcrumb/teamCrumb.tsx index eeaeee731d89ac..37f3945fba80d5 100644 --- a/static/app/views/settings/components/settingsBreadcrumb/teamCrumb.tsx +++ b/static/app/views/settings/components/settingsBreadcrumb/teamCrumb.tsx @@ -12,7 +12,7 @@ import BreadcrumbDropdown from './breadcrumbDropdown'; import MenuItem from './menuItem'; import {CrumbLink} from '.'; -type Props = RouteComponentProps<{teamId: string}, {}>; +type Props = RouteComponentProps<{teamId: string}>; function TeamCrumb({routes, route, ...props}: Props) { const navigate = useNavigate(); diff --git a/static/app/views/settings/components/settingsLayout.tsx b/static/app/views/settings/components/settingsLayout.tsx index 0a0028be50b4ca..66eef783c9f556 100644 --- a/static/app/views/settings/components/settingsLayout.tsx +++ b/static/app/views/settings/components/settingsLayout.tsx @@ -17,7 +17,7 @@ import SettingsSearch from './settingsSearch'; type Props = { children: React.ReactNode; renderNavigation?: (opts: {isMobileNavVisible: boolean}) => React.ReactNode; -} & RouteComponentProps<{}, {}>; +} & RouteComponentProps; function SettingsLayout(props: Props) { // This is used when the screen is small enough that the navigation should be diff --git a/static/app/views/settings/earlyFeatures/index.tsx b/static/app/views/settings/earlyFeatures/index.tsx index 36308a91589d6d..0f8e6f61ab2986 100644 --- a/static/app/views/settings/earlyFeatures/index.tsx +++ b/static/app/views/settings/earlyFeatures/index.tsx @@ -10,7 +10,7 @@ import SettingsPageHeader from 'sentry/views/settings/components/settingsPageHea import EarlyFeaturesSettingsForm from 'sentry/views/settings/earlyFeatures/settingsForm'; import {OrganizationPermissionAlert} from 'sentry/views/settings/organization/organizationPermissionAlert'; -export default function OrganizationGeneralSettings(props: RouteComponentProps<{}, {}>) { +export default function OrganizationGeneralSettings(props: RouteComponentProps) { const {isSelfHosted} = useLegacyStore(ConfigStore); const organization = useOrganization(); diff --git a/static/app/views/settings/earlyFeatures/settingsForm.tsx b/static/app/views/settings/earlyFeatures/settingsForm.tsx index fc847841a953d5..57bff925c7bfc1 100644 --- a/static/app/views/settings/earlyFeatures/settingsForm.tsx +++ b/static/app/views/settings/earlyFeatures/settingsForm.tsx @@ -13,7 +13,7 @@ import type {RouteComponentProps} from 'sentry/types/legacyReactRouter'; import {useApiQuery} from 'sentry/utils/queryClient'; import useOrganization from 'sentry/utils/useOrganization'; -interface Props extends RouteComponentProps<{}, {}> { +interface Props extends RouteComponentProps { access: Set; location: Location; } diff --git a/static/app/views/settings/organization/organizationSettingsLayout.tsx b/static/app/views/settings/organization/organizationSettingsLayout.tsx index f48b2d8632ddfd..70333ecb321158 100644 --- a/static/app/views/settings/organization/organizationSettingsLayout.tsx +++ b/static/app/views/settings/organization/organizationSettingsLayout.tsx @@ -5,7 +5,7 @@ import useOrganization from 'sentry/utils/useOrganization'; import SettingsLayout from 'sentry/views/settings/components/settingsLayout'; import OrganizationSettingsNavigation from 'sentry/views/settings/organization/organizationSettingsNavigation'; -type Props = RouteComponentProps<{}, {}> & { +type Props = RouteComponentProps & { children: React.ReactNode; }; diff --git a/static/app/views/settings/organizationDeveloperSettings/sentryApplicationDetails.tsx b/static/app/views/settings/organizationDeveloperSettings/sentryApplicationDetails.tsx index 43f5fe4808f37f..9eca3731e80f64 100644 --- a/static/app/views/settings/organizationDeveloperSettings/sentryApplicationDetails.tsx +++ b/static/app/views/settings/organizationDeveloperSettings/sentryApplicationDetails.tsx @@ -147,7 +147,7 @@ class SentryAppFormModel extends FormModel { } } -type Props = RouteComponentProps<{appSlug?: string}, {}> & { +type Props = RouteComponentProps<{appSlug?: string}> & { organization: Organization; }; diff --git a/static/app/views/settings/organizationIntegrations/abstractIntegrationDetailedView.tsx b/static/app/views/settings/organizationIntegrations/abstractIntegrationDetailedView.tsx index 097e952ae0263b..334bf60e792d53 100644 --- a/static/app/views/settings/organizationIntegrations/abstractIntegrationDetailedView.tsx +++ b/static/app/views/settings/organizationIntegrations/abstractIntegrationDetailedView.tsx @@ -49,7 +49,7 @@ type State = { type Props = { organization: Organization; -} & RouteComponentProps<{integrationSlug: string}, {}> & +} & RouteComponentProps<{integrationSlug: string}> & DeprecatedAsyncComponent['props']; abstract class AbstractIntegrationDetailedView< diff --git a/static/app/views/settings/organizationIntegrations/configureIntegration.tsx b/static/app/views/settings/organizationIntegrations/configureIntegration.tsx index c5361115749141..ed9823ffd40ea2 100644 --- a/static/app/views/settings/organizationIntegrations/configureIntegration.tsx +++ b/static/app/views/settings/organizationIntegrations/configureIntegration.tsx @@ -46,13 +46,10 @@ import IntegrationMainSettings from './integrationMainSettings'; import IntegrationRepos from './integrationRepos'; import {IntegrationServerlessFunctions} from './integrationServerlessFunctions'; -type Props = RouteComponentProps< - { - integrationId: string; - providerKey: string; - }, - {} ->; +type Props = RouteComponentProps<{ + integrationId: string; + providerKey: string; +}>; const TABS = [ 'repos', diff --git a/static/app/views/settings/organizationIntegrations/integrationListDirectory.tsx b/static/app/views/settings/organizationIntegrations/integrationListDirectory.tsx index 87f75aed331827..7ba212386054e8 100644 --- a/static/app/views/settings/organizationIntegrations/integrationListDirectory.tsx +++ b/static/app/views/settings/organizationIntegrations/integrationListDirectory.tsx @@ -63,7 +63,7 @@ const fuseOptions = { keys: ['slug', 'key', 'name', 'id'], }; -type Props = RouteComponentProps<{}, {}> & { +type Props = RouteComponentProps & { hideHeader: boolean; organization: Organization; }; diff --git a/static/app/views/settings/organizationRateLimits/organizationRateLimits.tsx b/static/app/views/settings/organizationRateLimits/organizationRateLimits.tsx index 63c70c04150b76..9c92990bb974b3 100644 --- a/static/app/views/settings/organizationRateLimits/organizationRateLimits.tsx +++ b/static/app/views/settings/organizationRateLimits/organizationRateLimits.tsx @@ -13,7 +13,7 @@ import type {Organization} from 'sentry/types/organization'; import SettingsPageHeader from 'sentry/views/settings/components/settingsPageHeader'; import TextBlock from 'sentry/views/settings/components/text/textBlock'; -export type OrganizationRateLimitProps = RouteComponentProps<{}, {}> & { +export type OrganizationRateLimitProps = RouteComponentProps & { organization: Organization; }; diff --git a/static/app/views/settings/organizationTeams/index.tsx b/static/app/views/settings/organizationTeams/index.tsx index 34750c2e6b5a89..075ecaec6aff7a 100644 --- a/static/app/views/settings/organizationTeams/index.tsx +++ b/static/app/views/settings/organizationTeams/index.tsx @@ -18,7 +18,7 @@ import useOrganization from 'sentry/utils/useOrganization'; import OrganizationTeams from './organizationTeams'; -export function OrganizationTeamsContainer(props: RouteComponentProps<{}, {}>) { +export function OrganizationTeamsContainer(props: RouteComponentProps) { const api = useApi(); const organization = useOrganization({allowNull: true}); const queryClient = useQueryClient(); diff --git a/static/app/views/settings/organizationTeams/organizationTeams.tsx b/static/app/views/settings/organizationTeams/organizationTeams.tsx index 9fd9d52a8b4fbd..1ddfea5cb2261a 100644 --- a/static/app/views/settings/organizationTeams/organizationTeams.tsx +++ b/static/app/views/settings/organizationTeams/organizationTeams.tsx @@ -32,7 +32,7 @@ type Props = { onRemoveAccessRequest: (id: string, isApproved: boolean) => void; organization: Organization; requestList: AccessRequest[]; -} & RouteComponentProps<{}, {}>; +} & RouteComponentProps; function OrganizationTeams({ organization, diff --git a/static/app/views/settings/organizationTeams/teamDetails.tsx b/static/app/views/settings/organizationTeams/teamDetails.tsx index a47f87bc9a6135..0efd9efdde2146 100644 --- a/static/app/views/settings/organizationTeams/teamDetails.tsx +++ b/static/app/views/settings/organizationTeams/teamDetails.tsx @@ -19,7 +19,7 @@ import {useTeamsById} from 'sentry/utils/useTeamsById'; type Props = { children: React.ReactNode; -} & RouteComponentProps<{teamId: string}, {}>; +} & RouteComponentProps<{teamId: string}>; function TeamDetails({children}: Props) { const api = useApi(); diff --git a/static/app/views/settings/organizationTeams/teamProjects.tsx b/static/app/views/settings/organizationTeams/teamProjects.tsx index b11404e2e16f54..e4dfd3e6d8043b 100644 --- a/static/app/views/settings/organizationTeams/teamProjects.tsx +++ b/static/app/views/settings/organizationTeams/teamProjects.tsx @@ -31,7 +31,7 @@ import useOrganization from 'sentry/utils/useOrganization'; import ProjectListItem from 'sentry/views/settings/components/settingsProjectItem'; import TextBlock from 'sentry/views/settings/components/text/textBlock'; -interface TeamProjectsProps extends RouteComponentProps<{teamId: string}, {}> { +interface TeamProjectsProps extends RouteComponentProps<{teamId: string}> { team: Team; } diff --git a/static/app/views/settings/organizationTeams/teamSettings/index.tsx b/static/app/views/settings/organizationTeams/teamSettings/index.tsx index 77a5cb4725b2f0..5904d0977531c0 100644 --- a/static/app/views/settings/organizationTeams/teamSettings/index.tsx +++ b/static/app/views/settings/organizationTeams/teamSettings/index.tsx @@ -25,7 +25,7 @@ import {useNavigate} from 'sentry/utils/useNavigate'; import useOrganization from 'sentry/utils/useOrganization'; import {ProjectPermissionAlert} from 'sentry/views/settings/project/projectPermissionAlert'; -interface TeamSettingsProps extends RouteComponentProps<{teamId: string}, {}> { +interface TeamSettingsProps extends RouteComponentProps<{teamId: string}> { team: Team; } diff --git a/static/app/views/settings/project/projectCreateServiceHook.tsx b/static/app/views/settings/project/projectCreateServiceHook.tsx index 89861bcb0888da..c0bf903f06db27 100644 --- a/static/app/views/settings/project/projectCreateServiceHook.tsx +++ b/static/app/views/settings/project/projectCreateServiceHook.tsx @@ -8,7 +8,7 @@ import withOrganization from 'sentry/utils/withOrganization'; import SettingsPageHeader from 'sentry/views/settings/components/settingsPageHeader'; import ServiceHookSettingsForm from 'sentry/views/settings/project/serviceHookSettingsForm'; -type Props = RouteComponentProps<{projectId: string}, {}> & { +type Props = RouteComponentProps<{projectId: string}> & { organization: Organization; }; diff --git a/static/app/views/settings/project/projectEnvironments.tsx b/static/app/views/settings/project/projectEnvironments.tsx index d9edfc398547c7..84581232f8c922 100644 --- a/static/app/views/settings/project/projectEnvironments.tsx +++ b/static/app/views/settings/project/projectEnvironments.tsx @@ -30,7 +30,7 @@ type Props = { api: Client; organization: Organization; project: Project; -} & RouteComponentProps<{projectId: string}, {}>; +} & RouteComponentProps<{projectId: string}>; type State = { environments: null | Environment[]; diff --git a/static/app/views/settings/project/projectFilters/index.tsx b/static/app/views/settings/project/projectFilters/index.tsx index 7f9b49f8de0940..92ac31ad0c6958 100644 --- a/static/app/views/settings/project/projectFilters/index.tsx +++ b/static/app/views/settings/project/projectFilters/index.tsx @@ -18,7 +18,7 @@ import {ProjectPermissionAlert} from 'sentry/views/settings/project/projectPermi type Props = { organization: Organization; project: Project; -} & RouteComponentProps<{filterType: string; projectId: string}, {}>; +} & RouteComponentProps<{filterType: string; projectId: string}>; function ProjectFilters(props: Props) { const {project, params} = props; diff --git a/static/app/views/settings/project/projectKeys/details/index.tsx b/static/app/views/settings/project/projectKeys/details/index.tsx index 7b16fb8b3ef35e..999e6bf74b641f 100644 --- a/static/app/views/settings/project/projectKeys/details/index.tsx +++ b/static/app/views/settings/project/projectKeys/details/index.tsx @@ -19,13 +19,10 @@ import {ProjectPermissionAlert} from 'sentry/views/settings/project/projectPermi type Props = { organization: Organization; project: Project; -} & RouteComponentProps< - { - keyId: string; - projectId: string; - }, - {} ->; +} & RouteComponentProps<{ + keyId: string; + projectId: string; +}>; export default function ProjectKeyDetails({organization, params, project}: Props) { const {keyId, projectId} = params; diff --git a/static/app/views/settings/project/projectKeys/details/keyRateLimitsForm.tsx b/static/app/views/settings/project/projectKeys/details/keyRateLimitsForm.tsx index e0bbb74a094cdf..b333a99b9836f3 100644 --- a/static/app/views/settings/project/projectKeys/details/keyRateLimitsForm.tsx +++ b/static/app/views/settings/project/projectKeys/details/keyRateLimitsForm.tsx @@ -33,13 +33,10 @@ type Props = { disabled: boolean; organization: Organization; } & Pick< - RouteComponentProps< - { - keyId: string; - projectId: string; - }, - {} - >, + RouteComponentProps<{ + keyId: string; + projectId: string; + }>, 'params' >; diff --git a/static/app/views/settings/project/projectKeys/details/keyStats.tsx b/static/app/views/settings/project/projectKeys/details/keyStats.tsx index 3f0f49eab8f678..0fc82658b0fc8f 100644 --- a/static/app/views/settings/project/projectKeys/details/keyStats.tsx +++ b/static/app/views/settings/project/projectKeys/details/keyStats.tsx @@ -19,13 +19,10 @@ type Props = { organization: Organization; theme: Theme; } & Pick< - RouteComponentProps< - { - keyId: string; - projectId: string; - }, - {} - >, + RouteComponentProps<{ + keyId: string; + projectId: string; + }>, 'params' >; diff --git a/static/app/views/settings/project/projectKeys/list/keyRow.tsx b/static/app/views/settings/project/projectKeys/list/keyRow.tsx index c180a00b712e62..3936f331b8ca02 100644 --- a/static/app/views/settings/project/projectKeys/list/keyRow.tsx +++ b/static/app/views/settings/project/projectKeys/list/keyRow.tsx @@ -24,7 +24,7 @@ type Props = { orgId: string; project: Project; projectId: string; -} & Pick, 'routes' | 'location' | 'params'>; +} & Pick; function KeyRow({ data, diff --git a/static/app/views/settings/project/projectKeys/list/loaderScript.tsx b/static/app/views/settings/project/projectKeys/list/loaderScript.tsx index 0389110c524479..bcecc05e1f72de 100644 --- a/static/app/views/settings/project/projectKeys/list/loaderScript.tsx +++ b/static/app/views/settings/project/projectKeys/list/loaderScript.tsx @@ -15,7 +15,7 @@ import recreateRoute from 'sentry/utils/recreateRoute'; type Props = { projectKey: ProjectKey; -} & Pick, 'routes' | 'location' | 'params'>; +} & Pick; export function LoaderScript({projectKey, routes, params, location}: Props) { const loaderLink = getDynamicText({ diff --git a/static/app/views/settings/project/projectReplays.tsx b/static/app/views/settings/project/projectReplays.tsx index 9898224c220f2a..dfcd3e14ba439a 100644 --- a/static/app/views/settings/project/projectReplays.tsx +++ b/static/app/views/settings/project/projectReplays.tsx @@ -17,7 +17,7 @@ import {ProjectPermissionAlert} from 'sentry/views/settings/project/projectPermi type RouteParams = { projectId: string; }; -type Props = RouteComponentProps & { +type Props = RouteComponentProps & { organization: Organization; project: Project; }; diff --git a/static/app/views/settings/project/projectSettingsLayout.tsx b/static/app/views/settings/project/projectSettingsLayout.tsx index bf58db99675e43..5991295eae4acc 100644 --- a/static/app/views/settings/project/projectSettingsLayout.tsx +++ b/static/app/views/settings/project/projectSettingsLayout.tsx @@ -12,7 +12,7 @@ import ProjectSettingsNavigation from 'sentry/views/settings/project/projectSett type Props = { children: React.ReactNode; organization: Organization; -} & RouteComponentProps<{projectId: string}, {}>; +} & RouteComponentProps<{projectId: string}>; type InnerProps = Props & {project: Project}; diff --git a/static/app/views/settings/project/projectToolbar.tsx b/static/app/views/settings/project/projectToolbar.tsx index 67ac28a4507e21..bacfa670797689 100644 --- a/static/app/views/settings/project/projectToolbar.tsx +++ b/static/app/views/settings/project/projectToolbar.tsx @@ -23,7 +23,7 @@ import {ProjectPermissionAlert} from 'sentry/views/settings/project/projectPermi type RouteParams = { projectId: string; }; -type Props = RouteComponentProps & { +type Props = RouteComponentProps & { organization: Organization; project: Project; }; diff --git a/static/app/views/settings/projectAlerts/index.tsx b/static/app/views/settings/projectAlerts/index.tsx index fe943c95e74734..386e42fb0f94e8 100644 --- a/static/app/views/settings/projectAlerts/index.tsx +++ b/static/app/views/settings/projectAlerts/index.tsx @@ -5,8 +5,7 @@ import type {RouteComponentProps} from 'sentry/types/legacyReactRouter'; import type {Organization} from 'sentry/types/organization'; import type {Project} from 'sentry/types/project'; -interface Props - extends RouteComponentProps<{organizationId: string; projectId: string}, {}> { +interface Props extends RouteComponentProps<{organizationId: string; projectId: string}> { children: React.ReactNode; organization: Organization; project: Project; diff --git a/static/app/views/settings/projectAlerts/settings.tsx b/static/app/views/settings/projectAlerts/settings.tsx index af02e095ed8e44..e6d0816e12584f 100644 --- a/static/app/views/settings/projectAlerts/settings.tsx +++ b/static/app/views/settings/projectAlerts/settings.tsx @@ -22,7 +22,7 @@ import useOrganization from 'sentry/utils/useOrganization'; import SettingsPageHeader from 'sentry/views/settings/components/settingsPageHeader'; import {ProjectPermissionAlert} from 'sentry/views/settings/project/projectPermissionAlert'; -interface ProjectAlertSettingsProps extends RouteComponentProps<{projectId: string}, {}> { +interface ProjectAlertSettingsProps extends RouteComponentProps<{projectId: string}> { canEditRule: boolean; } diff --git a/static/app/views/settings/projectDebugFiles/index.tsx b/static/app/views/settings/projectDebugFiles/index.tsx index 18e8ede3a215c6..86ab19a968c298 100644 --- a/static/app/views/settings/projectDebugFiles/index.tsx +++ b/static/app/views/settings/projectDebugFiles/index.tsx @@ -36,7 +36,7 @@ import {ProjectPermissionAlert} from 'sentry/views/settings/project/projectPermi import DebugFileRow from './debugFileRow'; import Sources from './sources'; -type Props = RouteComponentProps<{projectId: string}, {}> & { +type Props = RouteComponentProps<{projectId: string}> & { organization: Organization; project: Project; }; diff --git a/static/app/views/settings/projectGeneralSettings/index.tsx b/static/app/views/settings/projectGeneralSettings/index.tsx index 70fe7b92cb8cfd..f297e22a861daa 100644 --- a/static/app/views/settings/projectGeneralSettings/index.tsx +++ b/static/app/views/settings/projectGeneralSettings/index.tsx @@ -40,7 +40,7 @@ import TextBlock from 'sentry/views/settings/components/text/textBlock'; import {ProjectPermissionAlert} from 'sentry/views/settings/project/projectPermissionAlert'; type Props = DeprecatedAsyncComponent['props'] & - RouteComponentProps<{projectId: string}, {}> & { + RouteComponentProps<{projectId: string}> & { onChangeSlug: (slug: string) => void; organization: Organization; }; @@ -386,7 +386,7 @@ class ProjectGeneralSettings extends DeprecatedAsyncComponent { type ContainerProps = { organization: Organization; -} & RouteComponentProps<{projectId: string}, {}>; +} & RouteComponentProps<{projectId: string}>; class ProjectGeneralSettingsContainer extends Component { componentWillUnmount() { diff --git a/static/app/views/settings/projectIssueGrouping/index.tsx b/static/app/views/settings/projectIssueGrouping/index.tsx index b1aef37ba55345..a7885b7579daf0 100644 --- a/static/app/views/settings/projectIssueGrouping/index.tsx +++ b/static/app/views/settings/projectIssueGrouping/index.tsx @@ -18,7 +18,7 @@ import SettingsPageHeader from 'sentry/views/settings/components/settingsPageHea import TextBlock from 'sentry/views/settings/components/text/textBlock'; import {ProjectPermissionAlert} from 'sentry/views/settings/project/projectPermissionAlert'; -type Props = RouteComponentProps<{}, {projectId: string}> & { +type Props = RouteComponentProps<{projectId: string}> & { organization: Organization; project: Project; }; diff --git a/static/app/views/settings/projectPerformance/index.tsx b/static/app/views/settings/projectPerformance/index.tsx index e9bd79bc9535a6..bb547a28ed4d4d 100644 --- a/static/app/views/settings/projectPerformance/index.tsx +++ b/static/app/views/settings/projectPerformance/index.tsx @@ -5,7 +5,7 @@ import type {Project} from 'sentry/types/project'; import ProjectPerformance from './projectPerformance'; -type Props = RouteComponentProps<{projectId: string}, {}> & { +type Props = RouteComponentProps<{projectId: string}> & { organization: Organization; project: Project; }; diff --git a/static/app/views/settings/projectPerformance/projectPerformance.tsx b/static/app/views/settings/projectPerformance/projectPerformance.tsx index 8e27d83786a1d3..5d728161143662 100644 --- a/static/app/views/settings/projectPerformance/projectPerformance.tsx +++ b/static/app/views/settings/projectPerformance/projectPerformance.tsx @@ -99,7 +99,7 @@ export enum DetectorConfigCustomer { type RouteParams = {orgId: string; projectId: string}; -type Props = RouteComponentProps<{projectId: string}, {}> & { +type Props = RouteComponentProps<{projectId: string}> & { organization: Organization; project: Project; }; diff --git a/static/app/views/settings/projectPlugins/details.tsx b/static/app/views/settings/projectPlugins/details.tsx index f5132a7ed3ba77..b474d461d0e15f 100644 --- a/static/app/views/settings/projectPlugins/details.tsx +++ b/static/app/views/settings/projectPlugins/details.tsx @@ -28,7 +28,7 @@ type Props = { plugins: Plugin[]; }; project: Project; -} & RouteComponentProps<{pluginId: string; projectId: string}, {}>; +} & RouteComponentProps<{pluginId: string; projectId: string}>; type State = { pluginDetails?: Plugin; diff --git a/static/app/views/settings/projectPlugins/index.tsx b/static/app/views/settings/projectPlugins/index.tsx index 88f20245fed694..477cb999f215d9 100644 --- a/static/app/views/settings/projectPlugins/index.tsx +++ b/static/app/views/settings/projectPlugins/index.tsx @@ -14,7 +14,7 @@ import {ProjectPermissionAlert} from 'sentry/views/settings/project/projectPermi import ProjectPlugins from './projectPlugins'; -type Props = RouteComponentProps<{projectId: string}, {}> & { +type Props = RouteComponentProps<{projectId: string}> & { organization: Organization; plugins: { error: React.ComponentProps['error']; diff --git a/static/app/views/settings/projectPlugins/projectPluginRow.tsx b/static/app/views/settings/projectPlugins/projectPluginRow.tsx index 50cf3c1ff45e79..8fbad925e340c4 100644 --- a/static/app/views/settings/projectPlugins/projectPluginRow.tsx +++ b/static/app/views/settings/projectPlugins/projectPluginRow.tsx @@ -26,7 +26,7 @@ type Props = { organization: Organization; project: Project; } & Plugin & - Pick, 'params' | 'routes'>; + Pick; class ProjectPluginRow extends PureComponent { handleChange = () => { diff --git a/static/app/views/settings/projectPlugins/projectPlugins.tsx b/static/app/views/settings/projectPlugins/projectPlugins.tsx index 92dc029d97bbf6..0b027be50db03d 100644 --- a/static/app/views/settings/projectPlugins/projectPlugins.tsx +++ b/static/app/views/settings/projectPlugins/projectPlugins.tsx @@ -24,7 +24,7 @@ type Props = { organization: Organization; plugins: Plugin[]; project: Project; -} & RouteComponentProps<{}, {}>; +} & RouteComponentProps; class ProjectPlugins extends Component { render() { diff --git a/static/app/views/settings/projectProguard/index.tsx b/static/app/views/settings/projectProguard/index.tsx index ae5fe38f28928f..0fbf0ff600e519 100644 --- a/static/app/views/settings/projectProguard/index.tsx +++ b/static/app/views/settings/projectProguard/index.tsx @@ -20,7 +20,7 @@ import TextBlock from 'sentry/views/settings/components/text/textBlock'; import ProjectProguardRow from './projectProguardRow'; -export type ProjectProguardProps = RouteComponentProps<{projectId: string}, {}> & { +export type ProjectProguardProps = RouteComponentProps<{projectId: string}> & { organization: Organization; project: Project; }; diff --git a/static/app/views/settings/projectSourceMaps/index.tsx b/static/app/views/settings/projectSourceMaps/index.tsx index 66b984a6e73306..d424cad02815cb 100644 --- a/static/app/views/settings/projectSourceMaps/index.tsx +++ b/static/app/views/settings/projectSourceMaps/index.tsx @@ -4,15 +4,12 @@ import type {Project} from 'sentry/types/project'; import {SourceMapsDetails} from './sourceMapsDetails'; import {SourceMapsList} from './sourceMapsList'; -type Props = RouteComponentProps< - { - orgId: string; - projectId: string; - bundleId?: string; - name?: string; - }, - {} -> & { +type Props = RouteComponentProps<{ + orgId: string; + projectId: string; + bundleId?: string; + name?: string; +}> & { children: React.ReactNode; project: Project; }; diff --git a/static/app/views/settings/projectSourceMaps/sourceMapsDetails.tsx b/static/app/views/settings/projectSourceMaps/sourceMapsDetails.tsx index c6fe8eb499eed9..041d924027f776 100644 --- a/static/app/views/settings/projectSourceMaps/sourceMapsDetails.tsx +++ b/static/app/views/settings/projectSourceMaps/sourceMapsDetails.tsx @@ -99,10 +99,7 @@ function ArtifactsTableRow({ ); } -type Props = RouteComponentProps< - {bundleId: string; orgId: string; projectId: string}, - {} -> & { +type Props = RouteComponentProps<{bundleId: string; orgId: string; projectId: string}> & { project: Project; }; diff --git a/static/app/views/settings/projectSourceMaps/sourceMapsList.tsx b/static/app/views/settings/projectSourceMaps/sourceMapsList.tsx index 56b83467941615..e220436517fa0d 100644 --- a/static/app/views/settings/projectSourceMaps/sourceMapsList.tsx +++ b/static/app/views/settings/projectSourceMaps/sourceMapsList.tsx @@ -31,10 +31,11 @@ import SettingsPageHeader from 'sentry/views/settings/components/settingsPageHea import TextBlock from 'sentry/views/settings/components/text/textBlock'; import {useDeleteDebugIdBundle} from 'sentry/views/settings/projectSourceMaps/useDeleteDebugIdBundle'; -type Props = RouteComponentProps< - {orgId: string; projectId: string; bundleId?: string}, - {} -> & { +type Props = RouteComponentProps<{ + orgId: string; + projectId: string; + bundleId?: string; +}> & { project: Project; }; diff --git a/static/app/views/settings/projectTags/index.tsx b/static/app/views/settings/projectTags/index.tsx index 5d038d47d8c9ad..1d7c95494e333e 100644 --- a/static/app/views/settings/projectTags/index.tsx +++ b/static/app/views/settings/projectTags/index.tsx @@ -36,7 +36,7 @@ import SettingsPageHeader from 'sentry/views/settings/components/settingsPageHea import TextBlock from 'sentry/views/settings/components/text/textBlock'; import PermissionAlert from 'sentry/views/settings/project/projectPermissionAlert'; -type Props = RouteComponentProps<{projectId: string}, {}>; +type Props = RouteComponentProps<{projectId: string}>; type DeleteTagResponse = unknown; type DeleteTagVariables = {key: TagWithTopValues['key']}; diff --git a/static/app/views/settings/projectUserFeedback/index.tsx b/static/app/views/settings/projectUserFeedback/index.tsx index 3cb2ee151f71a0..f50dff259318e5 100644 --- a/static/app/views/settings/projectUserFeedback/index.tsx +++ b/static/app/views/settings/projectUserFeedback/index.tsx @@ -21,7 +21,7 @@ import {ProjectPermissionAlert} from 'sentry/views/settings/project/projectPermi type RouteParams = { projectId: string; }; -type Props = RouteComponentProps & { +type Props = RouteComponentProps & { organization: Organization; project: Project; }; diff --git a/static/app/views/settings/settingsIndex.tsx b/static/app/views/settings/settingsIndex.tsx index 7fecb73163f220..80efd2f8ad8f29 100644 --- a/static/app/views/settings/settingsIndex.tsx +++ b/static/app/views/settings/settingsIndex.tsx @@ -44,7 +44,7 @@ const LINKS = { const HOME_ICON_SIZE = 56; -interface SettingsIndexProps extends RouteComponentProps<{}, {}> { +interface SettingsIndexProps extends RouteComponentProps { organization: Organization; } diff --git a/static/app/views/sharedGroupDetails/index.tsx b/static/app/views/sharedGroupDetails/index.tsx index 8b78b97a1e0f7b..8a0b691542dca1 100644 --- a/static/app/views/sharedGroupDetails/index.tsx +++ b/static/app/views/sharedGroupDetails/index.tsx @@ -18,7 +18,7 @@ import {OrganizationContext} from '../organizationContext'; import SharedGroupHeader from './sharedGroupHeader'; -type Props = RouteComponentProps<{shareId: string; orgId?: string}, {}>; +type Props = RouteComponentProps<{shareId: string; orgId?: string}>; function SharedGroupDetails({params}: Props) { useLayoutEffect(() => { diff --git a/static/app/views/unsubscribe/issue.tsx b/static/app/views/unsubscribe/issue.tsx index 4189af482a5f4e..b2387445310ea5 100644 --- a/static/app/views/unsubscribe/issue.tsx +++ b/static/app/views/unsubscribe/issue.tsx @@ -19,7 +19,7 @@ type RouteParams = { orgId: string; }; -type Props = RouteComponentProps; +type Props = RouteComponentProps; function UnsubscribeIssue({location}: Props) { const signature = decodeScalar(location.query._); diff --git a/static/app/views/unsubscribe/project.tsx b/static/app/views/unsubscribe/project.tsx index 797baa174b332a..d88e8ec91aa5d1 100644 --- a/static/app/views/unsubscribe/project.tsx +++ b/static/app/views/unsubscribe/project.tsx @@ -17,7 +17,7 @@ type RouteParams = { orgId: string; }; -type Props = RouteComponentProps; +type Props = RouteComponentProps; function UnsubscribeProject({location}: Props) { const signature = decodeScalar(location.query._); diff --git a/static/app/views/userFeedback/index.tsx b/static/app/views/userFeedback/index.tsx index 8ece1fa088e019..7c334e3368ad50 100644 --- a/static/app/views/userFeedback/index.tsx +++ b/static/app/views/userFeedback/index.tsx @@ -31,7 +31,7 @@ import {makeFeedbackPathname} from 'sentry/views/userFeedback/pathnames'; import {UserFeedbackEmpty} from './userFeedbackEmpty'; import {getQuery} from './utils'; -interface Props extends RouteComponentProps<{}, {}> {} +interface Props extends RouteComponentProps {} function OrganizationUserFeedback({location: {search, pathname, query}, router}: Props) { const organization = useOrganization(); diff --git a/tests/js/sentry-test/initializeOrg.tsx b/tests/js/sentry-test/initializeOrg.tsx index 5fd4bd25bb2bdd..e243c26382c6fa 100644 --- a/tests/js/sentry-test/initializeOrg.tsx +++ b/tests/js/sentry-test/initializeOrg.tsx @@ -64,9 +64,9 @@ export function initializeOrg * initializeOrg({router: {params: {alertId: '123'}}}) * ``` */ - const routerProps: RouteComponentProps = { + const routerProps: RouteComponentProps = { params: router.params as any, - routeParams: router.params, + routeParams: router.params as any, router, route: router.routes[0]!, routes: router.routes, diff --git a/tests/js/sentry-test/reactTestingLibrary.tsx b/tests/js/sentry-test/reactTestingLibrary.tsx index d6911890c88dc8..69f5c753d0a3ae 100644 --- a/tests/js/sentry-test/reactTestingLibrary.tsx +++ b/tests/js/sentry-test/reactTestingLibrary.tsx @@ -102,10 +102,7 @@ type RenderReturn = T extends true // Inject legacy react-router 3 style router mocked navigation functions // into the memory history used in react router 6 -function patchBrowserHistoryMocksEnabled( - history: MemoryHistory, - router: InjectedRouter, any> -) { +function patchBrowserHistoryMocksEnabled(history: MemoryHistory, router: InjectedRouter) { Object.defineProperty(history, 'location', {get: () => router.location}); history.replace = router.replace; history.push = (path: any) => {