github.com/replicatedhq/ship@v0.55.0/web/init/src/redux/ui/main/reducer.js (about) 1 import { constants } from "./actions"; 2 3 const loadingState = { 4 appSettingsFieldsLoading: false, 5 consoleSettingsFieldsLoading: false, 6 saveAppSettingsLoading: false, 7 getCurrentStepLoading: false, 8 submitActionLoading: false, 9 fileContentLoading: false, 10 saveKustomizeLoading: false, 11 }; 12 13 export function loading(state = loadingState, action = {}) { 14 switch (action.type) { 15 case constants.LOADING_DATA: 16 return Object.assign({}, state, { 17 [`${action.payload.key}Loading`]: action.payload.isLoading 18 }); 19 default: 20 return state; 21 } 22 }