File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,10 @@ export async function hydrate(
28
28
return hydrateRoot (
29
29
document ,
30
30
< RouterHost Shell = { Shell } { ...options } >
31
- < Shell { ...globalX . __SERVERSIDE_PROPS__ } >
31
+ < Shell
32
+ route = { globalX . __INITIAL_ROUTE__ }
33
+ { ...globalX . __SERVERSIDE_PROPS__ }
34
+ >
32
35
< Initial . default { ...globalX . __SERVERSIDE_PROPS__ ?. props } />
33
36
</ Shell >
34
37
</ RouterHost > ,
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ export class StaticRouters {
89
89
} ) ;
90
90
}
91
91
const stream = await renderToReadableStream (
92
- < Shell { ...result } >
92
+ < Shell route = { serverSide . pathname + search } { ...result } >
93
93
< module . default { ...result ?. props } />
94
94
</ Shell > ,
95
95
{
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export const RouterHost = ({
69
69
onRouteUpdated,
70
70
} : {
71
71
children : React . ReactElement ;
72
- Shell : React . ComponentType < { children : React . ReactElement } > ;
72
+ Shell : React . ComponentType < { children : React . ReactElement ; route ?: string } > ;
73
73
onRouteUpdated ?: ( path : string ) => void ;
74
74
} ) => {
75
75
const pathname = useLocationProperty (
@@ -95,7 +95,7 @@ export const RouterHost = ({
95
95
onRouteUpdated ?.( target ) ;
96
96
setVersion ( currentVersion ) ;
97
97
setCurrent (
98
- < Shell { ...props } >
98
+ < Shell route = { target } { ...props } >
99
99
< module . default { ...props ?. props } />
100
100
</ Shell >
101
101
) ;
You can’t perform that action at this time.
0 commit comments