import actionTypes from '../actiontype/store';

const saveStore = (content,data)=>{
    return Object.assign({},content,data);
};

const saveStoreList = (content,data)=>{
    return Object.assign({},content,{storeList:data});
}

export default function(state={}, action) {
    switch (action.type) {
        case actionTypes.SAVESTORE:
            return saveStore(state,action.data);
        case actionTypes.SAVESTORELIST:
            return saveStoreList(state,action.data);
        default:
            return state;
    }
}