Skip to content

Commit 76eef4a

Browse files
committed
Removing unnecessary reload of page when bonus points or points override are updated.
1 parent 62c8dd6 commit 76eef4a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/containers/PointsContainer/PointsContainer.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
33
import { connect } from 'react-redux';
44
import PointsForm from '../../components/forms/PointsForm';
55

6-
import { setPoints, fetchSolution } from '../../redux/modules/solutions';
6+
import { setPoints } from '../../redux/modules/solutions';
77

88
const PointsContainer = ({ overriddenPoints = null, bonusPoints, setPoints, ...props }) => (
99
<PointsForm
@@ -26,9 +26,6 @@ PointsContainer.propTypes = {
2626
export default connect(
2727
(state, props) => ({}),
2828
(dispatch, { submissionId }) => ({
29-
setPoints: ({ overriddenPoints, bonusPoints }) =>
30-
dispatch(setPoints(submissionId, overriddenPoints, bonusPoints)).then(() =>
31-
dispatch(fetchSolution(submissionId))
32-
),
29+
setPoints: ({ overriddenPoints, bonusPoints }) => dispatch(setPoints(submissionId, overriddenPoints, bonusPoints)),
3330
})
3431
)(PointsContainer);

0 commit comments

Comments
 (0)