Skip to content

Latest commit

 

History

History
25 lines (23 loc) · 512 Bytes

CHANGELOG.md

File metadata and controls

25 lines (23 loc) · 512 Bytes

Removed some action types from Context reducer

case types.ADD_CONTEXT:
  return state
case types.ADD_DYNAMIC_FIELD:
  let filtered = state.fields.filter((field) => field.name !== action.name)
  return {
    ...state,
    fields: [
      ...filtered,
      {
        name: action.name,
        value: action.value,
        filename: action.filename
      }
    ]
  }

case types.REMOVE_DYNAMIC_FIELD:
  return {
    ...state,
    fields: state.fields.filter((field) => field.name !== action.name)
  }