Skip to content

Commit

Permalink
Use window.Intercom, temp pipette data format
Browse files Browse the repository at this point in the history
  • Loading branch information
Kadee80 committed Aug 28, 2018
1 parent 5369c84 commit cde177f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion app/src/components/RobotSettings/ResetRobotModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ function makeMapStateToProps (): (state: State, ownProps: OP) => SP {
const {robot} = ownProps
const optionsRequest = getResetOptions(state, robot)
const optionsResponse = optionsRequest.response
console.log('OPTIONS', {optionsResponse})
return {
options: optionsResponse && optionsResponse.options,
resetRequest: getResetRequest(state, robot),
Expand Down
9 changes: 6 additions & 3 deletions app/src/support.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,17 @@ export const supportMiddleware: Middleware = (store) => (next) => (action) => {
const robot = state.robot.connection.connectRequest.name
const data = {user_id: userId, 'Robot Name': robot}
log.debug('Updating intercom data', data)
intercom('update', data)
// TODO (ka 2018-8-28): intercom handler defaulting to noop
window.Intercom('update', data)
}

if (action.type === 'api:PIPETTES_SUCCESS') {
const pipettes = action.payload.pipettes
const data = {user_id: userId, 'Pipettes': pipettes}
const pipettesList = [pipettes.left.model, pipettes.right.model]
const data = {user_id: userId, 'Pipettes': pipettesList}
log.debug('Updating intercom data', data)
intercom('update', data)
// TODO (ka 2018-8-28): intercom handler defaulting to noop
window.Intercom('update', data)
}

return next(action)
Expand Down

0 comments on commit cde177f

Please sign in to comment.