File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -102,15 +102,17 @@ export function useRouteState<T extends {}>(key: string, initial: T) {
102102
103103export const RouterHost = ( {
104104 children,
105+ normalizeUrl = ( url : string ) => url ,
105106 Shell,
106107 onRouteUpdated,
107108} : {
108109 children : React . ReactElement ;
110+ normalizeUrl ?: ( url : string ) => string ;
109111 Shell : React . ComponentType < { children : React . ReactElement ; route ?: string } > ;
110112 onRouteUpdated ?: ( path : string ) => void ;
111113} ) => {
112114 const pathname = useLocationProperty (
113- ( ) => location . pathname + location . search ,
115+ ( ) => normalizeUrl ( location . pathname + location . search ) ,
114116 ( ) => globalX . __INITIAL_ROUTE__
115117 ) ;
116118 const [ current , setCurrent ] = useState ( children ) ;
You can’t perform that action at this time.
0 commit comments