Skip to content

Commit

Permalink
fix(build): sw-460 dev local run navigation (#965)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcabrera committed Aug 29, 2022
1 parent 52ae5bf commit ddc2dc6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down
2 changes: 1 addition & 1 deletion tests/__snapshots__/code.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Array [
"components/inventoryCard/inventoryCardHelpers.js:83: console.warn(\`Warning: Filter \\"\${id}\\" not found in \\"table row\\" response data.\`, cellData);",
"components/inventoryCard/inventoryList.deprecated.js:62: console.warn(\`Sorting can only be performed on select fields, confirm field \${id} is allowed.\`);",
"components/inventoryCardSubscriptions/inventoryCardSubscriptionsContext.js:127: console.warn(\`Sorting can only be performed on select fields, confirm field \${id} is allowed.\`);",
"index.js:10: appNavClick: (...args) => console.log(\`Emulated appNavClick: \${JSON.stringify(args)}\`),",
"index.js:12: console.log(\`Emulated appNavClick: \${JSON.stringify({ id, ...rest })}\`);",
"redux/common/reduxHelpers.js:282: console.error(\`Error: Property \${prop} does not exist within the passed state.\`, state);",
"redux/common/reduxHelpers.js:286: console.warn(\`Warning: Property \${prop} does not exist within the passed initialState.\`, initialState);",
"services/common/helpers.js:95: console.error(",
Expand Down

0 comments on commit ddc2dc6

Please sign in to comment.