client/app/bundles/course/survey/reducers/surveys.js
Function default
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function (state = [], action) {
switch (action.type) {
case actionTypes.CREATE_SURVEY_SUCCESS: {
return sortSurveysByDate([...state, sortSurveyElements(action.survey)]);
}
- Create a ticketCreate a ticket
Avoid too many return
statements within this function. Open
Open
return state.map((survey) => surveyReducer(survey, action));
- Create a ticketCreate a ticket