Skip to content

Commit b4caff3

Browse files
committed
Navigate to pipelines page after pipelines operator is installed
1 parent 84afc4c commit b4caff3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

frontend/src/pages/dependencies/DependencyMissingPage.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
import * as React from 'react';
2-
import { useParams } from 'react-router-dom';
2+
import { useNavigate, useParams } from 'react-router-dom';
33
import NotFound from '~/pages/NotFound';
44
import PipelinesDependencyMissing from '~/pages/dependencies/PipelinesDependencyMissing';
55
import { useAppContext } from '~/app/AppContext';
66

77
const 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 />;

0 commit comments

Comments
 (0)