You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

paymentReducer.js 367B

1234567891011121314151617181920
  1. import { PAYMENTS_SET } from "../../actions/payment/paymentActionConstants";
  2. import createReducer from "../../utils/createReducer";
  3. const initialState = {
  4. payments: [],
  5. };
  6. export default createReducer(
  7. {
  8. [PAYMENTS_SET]: setPayments,
  9. },
  10. initialState
  11. );
  12. function setPayments(state, action) {
  13. return {
  14. ...state,
  15. payments: action.payload,
  16. };
  17. }