import types from '../../types' const samplernnInitialState = { loading: false, error: null, folder: {}, folders: [], results: [], } const samplernnReducer = (state = samplernnInitialState, action) => { switch(action.type) { case types.socket.connect: return { ...state, } case types.task.task_begin: return { ...state, } case types.task.task_finish: if (state.runner[action.task.processor].task.uuid !== action.task.uuid) { return state } return { ...state, } case types.folder.index: console.log(action) return { folders: action.data, folder: action.data[0], } return case types.folder.update: console.log(action) return case types.file.index: console.log(action) return case types.file.create: console.log(action) return default: return state } } export default samplernnReducer