INNER CODE UNIT · JavaScript

ErrorNotificationReducer

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

export function ErrorNotificationReducer(state = {}, action) {
  switch (action.type) {
    case APP_CLEAR_ERROR_NOTIFICATION:
      return {}
    case APP_ERROR_NOTIFICATION:
      return {
        message: action.payload,
        index: action.index
      }
  }
  return state
}

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

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…