const defaultState = { nav: [] }

const nav = (state = defaultState, action) => {
    // 写入各种action对应的操作
    switch (action.type) {
        case 'SET_NAV':
            const _state = { ...state, nav: action.nav }
            return _state
        case 'RESET_NAV':
            return defaultState
        default:
            return state
    }
}

export default nav