import {RECIEVE_GADGETS} from '../../constants/dashboardConstants';

const moduleReducers = {};

moduleReducers[RECIEVE_GADGETS] = (state, action) => {
    return Object.assign({}, state, {
        gadgets: action.gadgets
    });
};

const dashboardReducer = (state = {}, action) => {

    return moduleReducers[action.type] ? moduleReducers[action.type](state, action) : state;
};

export default dashboardReducer;
