text: import {
    GET_CONCEPTS_BEGIN,
    GET_CONCEPTS_SUCCESS,
    GET_CONCEPTS_ERROR,
    GET_CONCEPT_BEGIN,
    GET_CONCEPT_SUCCESS,
    GET_CONCEPT_ERROR,
    GET_INNOVATION_DATA_BEGIN,
    GET_INNOVATION_DATA_SUCCESS,
    GET_INNOVATION_DATA_ERROR,
    GET_RESOURCE_DATA_BEGIN,
    GET_RESOURCE_DATA_SUCCESS,
    GET_RESOURCE_DATA_ERROR,
    CREATE_INNOVATION_BEGIN,
    CREATE_INNOVATION_SUCCESS,
    CREATE_INNOVATION_ERROR,
    EDIT_INNOVATION_KEYDATES_BEGIN,
    EDIT_INNOVATION_KEYDATES_SUCCESS,
    EDIT_INNOVATION_KEYDATES_ERROR,
    DELETE_INNOVATION_BEGIN,
    DELETE_INNOVATION_SUCCESS,
    DELETE_INNOVATION_ERROR,
    CREATE_CONCEPT_BEGIN,
    CREATE_CONCEPT_SUCCESS,
    CREATE_CONCEPT_ERROR,
    DELETE_CONCEPT_BEGIN,
    DELETE_CONCEPT_SUCCESS,
    DELETE_CONCEPT_ERROR,
    INVITE_INNOVATION_USERS_BEGIN,
    INVITE_INNOVATION_USERS_SUCCESS,
    INVITE_INNOVATION_USERS_ERROR,
    ADD_CONCEPT_CANVAS_BEGIN,
    ADD_CONCEPT_CANVAS_SUCCESS,
    ADD_CONCEPT_CANVAS_ERROR,
    SAVE_CONCEPT_FINANCE_SCORE_BEGIN,
    SAVE_CONCEPT_FINANCE_SCORE_SUCCESS,
    SAVE_CONCEPT_FINANCE_SCORE_ERROR
  } from '../config/constants';
  
  const initialState = {
    isLoading: false,
    isLoadingCanvas: false
  };
  
  export const loader = (state = initialState, action) => {
    switch (action.type) {
      case GET_CONCEPTS_BEGIN:
      case GET_CONCEPT_BEGIN:
      case GET_INNOVATION_DATA_BEGIN:
      case GET_RESOURCE_DATA_BEGIN:
      case CREATE_INNOVATION_BEGIN:
      case EDIT_INNOVATION_KEYDATES_BEGIN:
      case DELETE_INNOVATION_BEGIN:
      case CREATE_CONCEPT_BEGIN:
      case DELETE_CONCEPT_BEGIN:
      case INVITE_INNOVATION_USERS_BEGIN:
      case SAVE_CONCEPT_FINANCE_SCORE_BEGIN:
        return {
          ...initialState,
          isLoading: true,
        };
  
      case ADD_CONCEPT_CANVAS_BEGIN:
        return {
          ...initialState,
          isLoadingCanvas: true
        }
  
      case GET_CONCEPTS_SUCCESS:
      case GET_CONCEPTS_ERROR:
      case GET_CONCEPT_SUCCESS:
      case GET_CONCEPT_ERROR:
      case GET_INNOVATION_DATA_SUCCESS:
      case GET_INNOVATION_DATA_ERROR:
      case GET_RESOURCE_DATA_SUCCESS:
      case GET_RESOURCE_DATA_ERROR:
      case CREATE_INNOVATION_SUCCESS:
      case CREATE_INNOVATION_ERROR:
      case EDIT_INNOVATION_KEYDATES_SUCCESS:
      case EDIT_INNOVATION_KEYDATES_ERROR:
      case DELETE_INNOVATION_SUCCESS:
      case DELETE_INNOVATION_ERROR:
      case CREATE_CONCEPT_SUCCESS:
      case CREATE_CONCEPT_ERROR:
      case DELETE_CONCEPT_SUCCESS:
      case DELETE_CONCEPT_ERROR:
      case INVITE_INNOVATION_USERS_SUCCESS:
      case INVITE_INNOVATION_USERS_ERROR:
      case ADD_CONCEPT_CANVAS_SUCCESS:
      case ADD_CONCEPT_CANVAS_ERROR:
      case SAVE_CONCEPT_FINANCE_SCORE_SUCCESS:
      case SAVE_CONCEPT_FINANCE_SCORE_ERROR:
        return initialState;
  
      default:
        return state;
    }
  };
  