src/applications/personalization/profile/ducks/communicationPreferences.js
File communicationPreferences.js
has 344 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import recordEvent from '~/platform/monitoring/record-event';
import { apiRequest } from '~/platform/utilities/api';
import { LOADING_STATES } from '../../common/constants';
import { RX_TRACKING_SUPPORTING_FACILITIES } from '../constants';
Function reducer
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function reducer(state = initialState, action = {}) {
switch (action.type) {
case FETCH_STARTED: {
return { ...state, loadingStatus: LOADING_STATES.pending };
}
Avoid too many return
statements within this function. Open
Open
return newState;
Avoid too many return
statements within this function. Open
Open
return state;
Avoid too many return
statements within this function. Open
Open
return newState;