const types = require('../actions/actionTypes');
const _ = require('lodash');
const mapLocations = ['/manage','/manage/statistics','/manage/setting'];
const key = mapLocations.indexOf(location.pathname);
const defaultData = {
    currentPage: key
};
module.exports = function menu (state = defaultData, action) {
    switch (action.type) {
    case types.CURRENTPAGE:
        return _.assign({}, state, {currentPage: action.currentPage});
    default:
        return state;
    }
};

