File tree Expand file tree Collapse file tree
packages/jaeger-ui/src/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33
44import React from 'react' ;
55import { useLocation , useParams } from 'react-router-dom' ;
6- import { History , Location } from 'history' ;
7- import { history } from './configure-store' ;
6+ import { Location } from 'history' ;
87
98/**
109 * Interface representing route-related props passed to the enhanced component.
@@ -13,14 +12,12 @@ import { history } from './configure-store';
1312 * @property {string } pathname - The current URL pathname.
1413 * @property {string } search - The current URL search string.
1514 * @property {object } params - The URL parameters.
16- * @property {History } history - The history object for navigation.
1715 */
1816export type IWithRouteProps = {
1917 location : Location ;
2018 pathname : string ;
2119 search : string ;
2220 params : object ;
23- history : History ;
2421} ;
2522
2623/**
@@ -65,14 +62,7 @@ export default function withRouteProps(WrappedComponent: React.ElementType) {
6562 * @returns {React.Component } The enhanced component with additional route-related props.
6663 */
6764 return (
68- < WrappedComponent
69- { ...props }
70- location = { location }
71- pathname = { pathname }
72- search = { search }
73- params = { params }
74- history = { history }
75- />
65+ < WrappedComponent { ...props } location = { location } pathname = { pathname } search = { search } params = { params } />
7666 ) ;
7767 } ;
7868}
You can’t perform that action at this time.
0 commit comments