@@ -26,7 +26,7 @@ import {
2626} from '@patternfly/react-topology' ;
2727import * as React from 'react' ;
2828import { TFunction , useTranslation } from 'react-i18next' ;
29- import { useHistory , useLocation } from 'react-router' ;
29+ import { useNavigate , useLocation } from 'react-router-dom-v5-compat ' ;
3030import { nodeToLabel } from '../../korrel8r-utils' ;
3131import { InvalidNode } from '../../korrel8r/invalid' ;
3232import { Korrel8rNode } from '../../korrel8r/korrel8r.types' ;
@@ -213,7 +213,7 @@ export const Korrel8rTopology: React.FC<{
213213} > = ( { queryNodes, queryEdges, loggingAvailable, netobserveAvailable, setQuery } ) => {
214214 const { t } = useTranslation ( 'plugin__troubleshooting-panel-console-plugin' ) ;
215215 const location = useLocation ( ) ;
216- const history = useHistory ( ) ;
216+ const navigate = useNavigate ( ) ;
217217 const persistedQuery = useSelector ( ( state : State ) => {
218218 return state . plugins ?. tp ?. get ( 'persistedQuery' ) ;
219219 } ) as Query ;
@@ -273,9 +273,9 @@ export const Korrel8rTopology: React.FC<{
273273 goal : null ,
274274 constraint : persistedQuery . constraint ,
275275 } ) ;
276- history . push ( '/' + korrel8rNode . toURL ( ) ) ;
276+ navigate ( '/' + korrel8rNode . toURL ( ) ) ;
277277 } ,
278- [ history , nodes , selectedIds , setQuery , persistedQuery ] ,
278+ [ navigate , nodes , selectedIds , setQuery , persistedQuery ] ,
279279 ) ;
280280
281281 const controller = React . useMemo ( ( ) => {
0 commit comments