Changes in src/Clients/Angular/finki-chattery/src/app/core/state/question-state/question.reducers.ts [6165fd0:9df3069]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Clients/Angular/finki-chattery/src/app/core/state/question-state/question.reducers.ts
r6165fd0 r9df3069 162 162 }; 163 163 } 164 case QuestionActionTypes.DeleteAnswerSuccess: {165 if (state.question) {166 return {167 ...state,168 question: {169 ...state.question,170 answers: state.question.answers.filter((x) => x.uid !== action.payload)171 }172 };173 }174 175 return {176 ...state177 };178 }179 case QuestionActionTypes.DeleteAnswerResponseSuccess: {180 if (state.question) {181 return {182 ...state,183 question: {184 ...state.question,185 answers: state.question.answers.map((x) => {186 if (x.uid === action.answerUid) {187 return {188 ...x,189 answerResponses: x.answerResponses.filter((y) => y.uid !== action.payload)190 };191 }192 193 return x;194 })195 }196 };197 }198 199 return {200 ...state201 };202 }203 164 case QuestionActionTypes.AnswerQuestionSuccess: { 204 165 if (state.question) {
Note:
See TracChangeset
for help on using the changeset viewer.