INNER CODE UNIT · JavaScript

SuccessNotificationReducer

jippi/hashi-ui · frontend/src/reducers/app.js:24

export function SuccessNotificationReducer(state = {}, action) {
  switch (action.type) {
    case APP_CLEAR_SUCCESS_NOTIFICATION:
      return {}
    case APP_SUCCESS_NOTIFICATION:
      return {
        message: action.payload,
        index: action.index
      }
  }

  return state
}

export function AppErrorReducer(state = {}, action) {
  switch (action.type) {
    case APP_ERROR:
      return action.payload

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…