%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/src/Components/store/reducers/
Upload File :
Create Path :
Current File : /var/www/html/src/Components/store/reducers/GlobalReducers.js

import { GET_CONTACT, GET_FOOTER, GET_MENU, IS_COLOR } from "../Action";

const GlobalReducer = (state, action) => {
  if (action.type === GET_CONTACT) {
    return { ...state, contact: action.payload };
  }
  if (action.type === GET_FOOTER) {
    return { ...state, footer: action.payload };
  }
  if (action.type === GET_MENU) {
    return { ...state, menu: action.payload };
  }
  if (action.type === IS_COLOR) {
    return { ...state, isColor: action.payload };
  }
  throw new Error(`No Matching "${action.type}" - action type`);
};

export default GlobalReducer;

Zerion Mini Shell 1.0