File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
frontend/src/pages/dependencies Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11import * as React from 'react' ;
2- import { useParams } from 'react-router-dom' ;
2+ import { useNavigate , useParams } from 'react-router-dom' ;
33import NotFound from '~/pages/NotFound' ;
44import PipelinesDependencyMissing from '~/pages/dependencies/PipelinesDependencyMissing' ;
55import { useAppContext } from '~/app/AppContext' ;
66
77const DependencyMissingPage : React . FC = ( ) => {
88 const { dashboardConfig } = useAppContext ( ) ;
99 const { area } = useParams ( ) ;
10+ const navigate = useNavigate ( ) ;
1011
1112 switch ( area ) {
1213 case 'pipelines' :
1314 if ( dashboardConfig . status . dependencyOperators . redhatOpenshiftPipelines . available ) {
1415 // eslint-disable-next-line no-console
1516 console . warn (
16- 'The pipelines dependency has been met, this page will not render the content .' ,
17+ 'The pipelines dependency has been met, this page will redirect to pipelines page .' ,
1718 ) ;
19+ navigate ( '/pipelines' ) ;
1820 break ;
1921 }
2022 return < PipelinesDependencyMissing /> ;
You can’t perform that action at this time.
0 commit comments