import { GET_SCALE_SEARCH_RESULT,CLEAR_SCALE_SEARCH_LIST } from '../types/scaleSearch.js';

const initState = {
    searchResult: []
}

export default function (state=initState, action) {
    const res = Object.assign({},state);
    switch(action.type) {
        case GET_SCALE_SEARCH_RESULT:
            res.searchResult = action.data;
            return res;
        case CLEAR_SCALE_SEARCH_LIST:
            res.searchResult=[];
            return res;
        default: 
            return res;
    }
}