@@ -27,7 +27,6 @@ import {
27
27
Router ,
28
28
UNSAFE_DataRouterContext as DataRouterContext ,
29
29
UNSAFE_DataRouterStateContext as DataRouterStateContext ,
30
- UNSAFE_DataStaticRouterContext as DataStaticRouterContext ,
31
30
UNSAFE_enhanceManualRouteObjects as enhanceManualRouteObjects ,
32
31
} from "react-router-dom" ;
33
32
@@ -98,6 +97,7 @@ export function StaticRouterProvider({
98
97
router,
99
98
navigator : getStatelessNavigator ( ) ,
100
99
static : true ,
100
+ staticContext : context ,
101
101
basename : context . basename || "/" ,
102
102
} ;
103
103
@@ -119,22 +119,18 @@ export function StaticRouterProvider({
119
119
120
120
return (
121
121
< >
122
- < DataStaticRouterContext . Provider value = { context } >
123
- < DataRouterContext . Provider value = { dataRouterContext } >
124
- < DataRouterStateContext . Provider
125
- value = { dataRouterContext . router . state }
122
+ < DataRouterContext . Provider value = { dataRouterContext } >
123
+ < DataRouterStateContext . Provider value = { dataRouterContext . router . state } >
124
+ < Router
125
+ basename = { dataRouterContext . basename }
126
+ location = { dataRouterContext . router . state . location }
127
+ navigationType = { dataRouterContext . router . state . historyAction }
128
+ navigator = { dataRouterContext . navigator }
126
129
>
127
- < Router
128
- basename = { dataRouterContext . basename }
129
- location = { dataRouterContext . router . state . location }
130
- navigationType = { dataRouterContext . router . state . historyAction }
131
- navigator = { dataRouterContext . navigator }
132
- >
133
- < Routes />
134
- </ Router >
135
- </ DataRouterStateContext . Provider >
136
- </ DataRouterContext . Provider >
137
- </ DataStaticRouterContext . Provider >
130
+ < Routes />
131
+ </ Router >
132
+ </ DataRouterStateContext . Provider >
133
+ </ DataRouterContext . Provider >
138
134
{ hydrateScript ? (
139
135
< script
140
136
suppressHydrationWarning
0 commit comments