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(
2828 return hydrateRoot (
2929 document ,
3030 < RouterHost Shell = { Shell } { ...options } >
31- < Shell { ...globalX . __SERVERSIDE_PROPS__ } >
31+ < Shell
32+ route = { globalX . __INITIAL_ROUTE__ }
33+ { ...globalX . __SERVERSIDE_PROPS__ }
34+ >
3235 < Initial . default { ...globalX . __SERVERSIDE_PROPS__ ?. props } />
3336 </ Shell >
3437 </ RouterHost > ,
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ export class StaticRouters {
8989 } ) ;
9090 }
9191 const stream = await renderToReadableStream (
92- < Shell { ...result } >
92+ < Shell route = { serverSide . pathname + search } { ...result } >
9393 < module . default { ...result ?. props } />
9494 </ Shell > ,
9595 {
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export const RouterHost = ({
6969 onRouteUpdated,
7070} : {
7171 children : React . ReactElement ;
72- Shell : React . ComponentType < { children : React . ReactElement } > ;
72+ Shell : React . ComponentType < { children : React . ReactElement ; route ?: string } > ;
7373 onRouteUpdated ?: ( path : string ) => void ;
7474} ) => {
7575 const pathname = useLocationProperty (
@@ -95,7 +95,7 @@ export const RouterHost = ({
9595 onRouteUpdated ?.( target ) ;
9696 setVersion ( currentVersion ) ;
9797 setCurrent (
98- < Shell { ...props } >
98+ < Shell route = { target } { ...props } >
9999 < module . default { ...props ?. props } />
100100 </ Shell >
101101 ) ;
You can’t perform that action at this time.
0 commit comments