import { types } from "../actions/actionTypes";

const initialState = {
  mainIndex: null,
};

export const appDataReducer = (state = initialState, action) => {
  switch (action.type) {
    case types.ADD_MAIN_INDEX:
      return {
        ...state,
        mainIndex: action.payload,
      };

    default:
      return state;
  }
};
