Navigation: Fix navigation from image builder to other apps
This commit is contained in:
parent
2b2660520f
commit
8b129f4b7c
1 changed files with 3 additions and 2 deletions
|
|
@ -5,6 +5,7 @@ import '@patternfly/patternfly/patternfly-addons.css';
|
||||||
import NotificationsPortal from '@redhat-cloud-services/frontend-components-notifications/NotificationPortal';
|
import NotificationsPortal from '@redhat-cloud-services/frontend-components-notifications/NotificationPortal';
|
||||||
|
|
||||||
import { Router } from './Router';
|
import { Router } from './Router';
|
||||||
|
import { resolveRelPath } from './Utilities/path';
|
||||||
|
|
||||||
const App = (props) => {
|
const App = (props) => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
@ -14,8 +15,8 @@ const App = (props) => {
|
||||||
document.title = 'Image Builder | Red Hat Insights';
|
document.title = 'Image Builder | Red Hat Insights';
|
||||||
insights.chrome.init();
|
insights.chrome.init();
|
||||||
insights.chrome.identifyApp('image-builder');
|
insights.chrome.identifyApp('image-builder');
|
||||||
const unregister = insights.chrome.on('APP_NAVIGATION', (event) =>
|
const unregister = insights.chrome.on('APP_NAVIGATION', () =>
|
||||||
navigate(`/${event.navId}`)
|
navigate(resolveRelPath(''))
|
||||||
);
|
);
|
||||||
return () => {
|
return () => {
|
||||||
unregister();
|
unregister();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue