Fix job submit infinite loop/promo ajax bugs
This commit is contained in:
@ -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');
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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",
|
||||
|
Reference in New Issue
Block a user