import produce from 'immer';
import { Fragment } from 'react';

export const initialState = {
    menu: {
      refresh: '',
    },
};

export default function reducer(state = initialState, action = {}) {
    return produce(state, draft => {
        switch (action.type) {
            case MENU_REFRESH:
                draft.menu = action.payload;
                break;
        }
    });
}

export const MENU_REFRESH = 'GLOBAL_MENU/REFRESH';
export const refreshMenuAction = payload => ({ type: MENU_REFRESH, payload });
