diff --git a/common/app/routes/Jobs/components/GoToPayPal.jsx b/common/app/routes/Jobs/components/GoToPayPal.jsx index 55c5ad179d..3879a7a2bb 100644 --- a/common/app/routes/Jobs/components/GoToPayPal.jsx +++ b/common/app/routes/Jobs/components/GoToPayPal.jsx @@ -55,6 +55,11 @@ export default contain( jobActions: PropTypes.object }, + componentDidMount() { + const { jobActions } = this.props; + jobActions.clearPromo(); + }, + goToJobBoard() { const { appActions } = this.props; appActions.goTo('/jobs'); diff --git a/common/app/routes/Jobs/components/Preview.jsx b/common/app/routes/Jobs/components/Preview.jsx index dd1734210d..804b34b6d8 100644 --- a/common/app/routes/Jobs/components/Preview.jsx +++ b/common/app/routes/Jobs/components/Preview.jsx @@ -1,5 +1,4 @@ import React, { PropTypes } from 'react'; -import { Lifecycle } from 'react-router'; import { Button, Row, Col } from 'react-bootstrap'; import { contain } from 'thundercats-react'; @@ -26,8 +25,6 @@ export default contain( jobActions: PropTypes.object }, - mixins: [Lifecycle], - componentDidMount() { const { appActions, job } = this.props; // redirect user in client @@ -36,11 +33,6 @@ export default contain( } }, - routerWillLeave() { - const { jobActions } = this.props; - jobActions.clearPromo(); - }, - render() { const { appActions, job, jobActions } = this.props; diff --git a/common/app/routes/Jobs/flux/Actions.js b/common/app/routes/Jobs/flux/Actions.js index b1ac6f5b41..961433eb0d 100644 --- a/common/app/routes/Jobs/flux/Actions.js +++ b/common/app/routes/Jobs/flux/Actions.js @@ -138,7 +138,6 @@ export default Actions({ body.type = type; } return this.postJSON$('/api/promos/getButton', body) - .pluck('response') .map(({ promo }) => { if (!promo || !promo.buttonId) { return noOper; diff --git a/package.json b/package.json index 15089cde03..8ec11c6ca5 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "loopback": "^2.22.0", "loopback-boot": "^2.13.0", "loopback-component-passport": "^1.6.0", - "loopback-connector-mongodb": "1.13.3", + "loopback-connector-mongodb": "1.13.0", "merge-stream": "^1.0.0", "method-override": "^2.3.0", "moment": "^2.10.2",