From f06a3d4bcd4ac46f3ee6e8d6c54d54b4fe66e2e3 Mon Sep 17 00:00:00 2001 From: CD Cabrera Date: Mon, 29 Aug 2022 12:24:55 -0400 Subject: [PATCH] fix(build): sw-460 dev local run navigation (#965) --- src/index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 760bc425c..7f0975627 100644 --- a/src/index.js +++ b/src/index.js @@ -4,10 +4,17 @@ import './styles/standalone.scss'; import '@patternfly/react-core/dist/styles/base.css'; import('./bootstrap'); +import { routerHelpers } from './components/router'; window.insights = { chrome: { - appNavClick: (...args) => console.log(`Emulated appNavClick: ${JSON.stringify(args)}`), + appNavClick: ({ id, ...rest }) => { + console.log(`Emulated appNavClick: ${JSON.stringify({ id, ...rest })}`); + document.location.href = routerHelpers.pathJoin( + document.location.pathname, + routerHelpers.getRouteConfig({ id }).path + ); + }, auth: { getUser: () => new Promise(resolve => {