/* like mutation */
import ACTION from '../actions/actiontsTypes';

const initialState = {
    basketData: JSON.parse(window.localStorage.getItem("goodsData")) || [],
};

export default function (state = initialState, action) {
    switch (action.type) {
        case ACTION.GOODS_BASKET_UPDATE_DATA: {
            return {
                ...state,
                basketData: action.data,
                isFetching: true,
                error: null
            }
        }
        default: {
            return state
        }
    }
}

