blob: 5a49aba61f30b659ef14e3210d57aad00004b3d6 (
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
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
|