github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/build-blockchain-insurance-app-master/web/src/shop/reducers/paymentReducer.js (about)

     1  'use strict';
     2  
     3  import * as PaymentActionType from '../actions/paymentActionTypes';
     4  import * as initialState from './initialState';
     5  
     6  export default function paymentReducer(state = initialState.payment, action) {
     7    switch (action.type) {
     8      case PaymentActionType.COMPLETE_PAYMENT:
     9        return Object.assign({}, state, { payed: action.payed });
    10      default:
    11        return state;
    12    }
    13  }