const HIDE_MAP_PANEL = 'HIDE_MAP_PANEL';
const SHOW_MAP_PANEL = 'SHOW_MAP_PANEL';
const TOGGLE_MAP_PANEL = 'TOGGLE_MAP_PANEL';

const initialState = {};

export default function MapPanelReducer(state = initialState, action) {
  switch (action.type) {
    case HIDE_MAP_PANEL:
      console.log({isMapPanelVisible: false});
      return {
        ...state,
        isMapPanelVisible: false
      };

    case SHOW_MAP_PANEL:
      console.log({isMapPanelVisible: true});
      return {
        ...state,
        isMapPanelVisible: true
      };

    case TOGGLE_MAP_PANEL:
      return {
        ...state,
        isMapPanelVisible: !state.isMapPanelVisible
      };

    default:
      return state;
  }
}

export const hideMapPanel = () => ({ type: HIDE_MAP_PANEL });
export const showMapPanel = () => ({ type: SHOW_MAP_PANEL });
export const toggleMapPanel = () => ({ type: TOGGLE_MAP_PANEL });

window.MapPanelReducer = MapPanelReducer;

const HIDE_MAP_PANEL = 'HIDE_MAP_PANEL';
const SHOW_MAP_PANEL = 'SHOW_MAP_PANEL';
const TOGGLE_MAP_PANEL = 'TOGGLE_MAP_PANEL';

const initialState = {};

export default function MapPanelReducer(state = initialState, action) {
  switch (action.type) {
    case HIDE_MAP_PANEL:
      return {
        ...state,
        isMapPanelVisible: false
      };

    case SHOW_MAP_PANEL:
      return {
        ...state,
        isMapPanelVisible: true
      };

    case TOGGLE_MAP_PANEL:
      return {
        ...state,
        isMapPanelVisible: !state.isMapPanelVisible
      };

    default:
      return state;
  }
}

export const hideMapPanel = () => ({ type: HIDE_MAP_PANEL });
export const showMapPanel = () => ({ type: SHOW_MAP_PANEL });
export const toggleMapPanel = () => ({ type: TOGGLE_MAP_PANEL });

window.MapPanelReducer = MapPanelReducer;

Remove 's