equal
deleted
inserted
replaced
83 }) |
83 }) |
84 default: |
84 default: |
85 return state |
85 return state |
86 } |
86 } |
87 } |
87 } |
|
88 |
|
89 export const groups = (state = Immutable.List([]), action) => { |
|
90 switch (action.type) { |
|
91 default: |
|
92 return state |
|
93 } |
|
94 } |
|
95 |
|
96 export const createGroup = (state = asyncRequest, action) => { |
|
97 switch (action.type) { |
|
98 case types.GROUP_CREATE_ASYNC: |
|
99 return Immutable.Map({ |
|
100 loading: true, |
|
101 success: false, |
|
102 error: false, |
|
103 }) |
|
104 case types.GROUP_CREATE_SUCCESS: |
|
105 case types.GROUP_CREATE_ERROR: |
|
106 return Immutable.Map({ |
|
107 loading: false, |
|
108 success: action.type === types.GROUP_CREATE_SUCCESS, |
|
109 error: action.type === types.GROUP_CREATE_ERROR, |
|
110 errorMessages: action.type === types.GROUP_CREATE_ERROR ? Immutable.Map(action.error) : Immutable.Map({}) |
|
111 }) |
|
112 default: |
|
113 return state |
|
114 } |
|
115 } |