Browse Source

bugfix - client - approotPath not passed correctly

pull/4023/head
Michael Shanks 6 years ago
parent
commit
1657beb8fc
  1. 2
      packages/client/src/createApp.js
  2. 4
      packages/client/src/state/stateManager.js

2
packages/client/src/createApp.js

@ -32,6 +32,7 @@ export const createApp = (
uiFunctions, uiFunctions,
onScreenSlotRendered: () => {}, onScreenSlotRendered: () => {},
routeTo, routeTo,
appRootPath: frontendDefinition.appRootPath,
}) })
const getAttchChildrenParams = attachChildrenParams(stateManager) const getAttchChildrenParams = attachChildrenParams(stateManager)
screenSlotNode.props._children = [screen.props] screenSlotNode.props._children = [screen.props]
@ -78,6 +79,7 @@ export const createApp = (
componentLibraries, componentLibraries,
uiFunctions, uiFunctions,
onScreenSlotRendered, onScreenSlotRendered,
appRootPath: frontendDefinition.appRootPath,
// seems weird, but the routeTo variable may not be available at this point // seems weird, but the routeTo variable may not be available at this point
routeTo: url => routeTo(url), routeTo: url => routeTo(url),
}) })

4
packages/client/src/state/stateManager.js

@ -23,14 +23,14 @@ const isMetaProp = propName =>
export const createStateManager = ({ export const createStateManager = ({
store, store,
coreApi, coreApi,
rootPath, appRootPath,
frontendDefinition, frontendDefinition,
componentLibraries, componentLibraries,
uiFunctions, uiFunctions,
onScreenSlotRendered, onScreenSlotRendered,
routeTo, routeTo,
}) => { }) => {
let handlerTypes = eventHandlers(store, coreApi, rootPath, routeTo) let handlerTypes = eventHandlers(store, coreApi, appRootPath, routeTo)
let currentState let currentState
// any nodes that have props that are bound to the store // any nodes that have props that are bound to the store

Loading…
Cancel
Save