File tree Expand file tree Collapse file tree 4 files changed +17
-10
lines changed Expand file tree Collapse file tree 4 files changed +17
-10
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " react-router-dom " : patch
3
+ " react-router " : patch
4
+ ---
5
+
6
+ [ REMOVE] Fix plumbing of future flags
Original file line number Diff line number Diff line change @@ -667,9 +667,6 @@ export function RouterProvider({
667
667
navigator,
668
668
static : false ,
669
669
basename,
670
- future : {
671
- v7_relativeSplatPath : router . future . v7_relativeSplatPath ,
672
- } ,
673
670
} ) ,
674
671
[ router , navigator , basename ]
675
672
) ;
@@ -691,6 +688,9 @@ export function RouterProvider({
691
688
location = { state . location }
692
689
navigationType = { state . historyAction }
693
690
navigator = { navigator }
691
+ future = { {
692
+ v7_relativeSplatPath : router . future . v7_relativeSplatPath ,
693
+ } }
694
694
>
695
695
{ state . initialized ? (
696
696
< DataRoutes
Original file line number Diff line number Diff line change @@ -149,9 +149,6 @@ export function RouterProvider({
149
149
navigator,
150
150
static : false ,
151
151
basename,
152
- future : {
153
- v7_relativeSplatPath : router . future . v7_relativeSplatPath ,
154
- } ,
155
152
} ) ,
156
153
[ router , navigator , basename ]
157
154
) ;
@@ -171,6 +168,9 @@ export function RouterProvider({
171
168
location = { state . location }
172
169
navigationType = { state . historyAction }
173
170
navigator = { navigator }
171
+ future = { {
172
+ v7_relativeSplatPath : router . future . v7_relativeSplatPath ,
173
+ } }
174
174
>
175
175
{ state . initialized ? (
176
176
< DataRoutes
@@ -396,9 +396,7 @@ export interface RouterProps {
396
396
navigationType ?: NavigationType ;
397
397
navigator : Navigator ;
398
398
static ?: boolean ;
399
- future ?: {
400
- v7_relativeSplatPath ?: boolean ;
401
- } ;
399
+ future ?: Partial < Pick < FutureConfig , "v7_relativeSplatPath" > > ;
402
400
}
403
401
404
402
/**
Original file line number Diff line number Diff line change @@ -70,7 +70,10 @@ export interface RouteMatch<
70
70
71
71
export interface DataRouteMatch extends RouteMatch < string , DataRouteObject > { }
72
72
73
- export interface DataRouterContextObject extends NavigationContextObject {
73
+ export interface DataRouterContextObject
74
+ // Omit `future` since those can be pulled from the `router`
75
+ // `NavigationContext` needs future since it doesn't have a `router` in all cases
76
+ extends Omit < NavigationContextObject , "future" > {
74
77
router : Router ;
75
78
staticContext ?: StaticHandlerContext ;
76
79
}
You can’t perform that action at this time.
0 commit comments