summaryrefslogtreecommitdiff
path: root/app/client/modules/samplernn/samplernn.reducer.js
blob: a642919d7f1f68acb2701073c52e8ce1885cbc12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import types from '../../types'

const samplernnInitialState = {
  loading: false,
  error: null,
  datasets: [],
  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,
      }
    default:
      return state
  }
}

export default samplernnReducer