Navigation: Fix navigation from image builder to other apps

This commit is contained in:
Karel Hala 2022-11-16 10:08:26 +01:00 committed by Sanne Raymaekers
parent 2b2660520f
commit 8b129f4b7c

View file

@ -5,6 +5,7 @@ import '@patternfly/patternfly/patternfly-addons.css';
import NotificationsPortal from '@redhat-cloud-services/frontend-components-notifications/NotificationPortal';
import { Router } from './Router';
import { resolveRelPath } from './Utilities/path';
const App = (props) => {
const navigate = useNavigate();
@ -14,8 +15,8 @@ const App = (props) => {
document.title = 'Image Builder | Red Hat Insights';
insights.chrome.init();
insights.chrome.identifyApp('image-builder');
const unregister = insights.chrome.on('APP_NAVIGATION', (event) =>
navigate(`/${event.navId}`)
const unregister = insights.chrome.on('APP_NAVIGATION', () =>
navigate(resolveRelPath(''))
);
return () => {
unregister();