|
|
@ -22,7 +22,7 @@ interface ContextState { |
|
|
|
|
|
|
|
setting: SettingDTO; |
|
|
|
settingReqStatus: ReqStatus; |
|
|
|
error: string | null; |
|
|
|
error?: string; |
|
|
|
} |
|
|
|
|
|
|
|
const orgGwdXmStr = localStorage.getItem('org_gwd_xm'); |
|
|
@ -60,7 +60,7 @@ const initialState: ContextState = { |
|
|
|
standbyMinutes: 20, |
|
|
|
}, |
|
|
|
settingReqStatus: 'idle', |
|
|
|
error: null, |
|
|
|
error: undefined, |
|
|
|
}; |
|
|
|
|
|
|
|
export const fetchConfig = createAsyncThunk('context/fetchConfig', async (_, thunkAPI) => { |
|
|
@ -128,7 +128,7 @@ export const contextSlice = createSlice({ |
|
|
|
}); |
|
|
|
builder.addCase(fetchConfig.rejected, (state, action) => { |
|
|
|
state.settingReqStatus = 'failed'; |
|
|
|
state.error = action.payload as string; |
|
|
|
state.error = action.error.message; |
|
|
|
}); |
|
|
|
builder.addCase(saveConfig.pending, (state) => { |
|
|
|
state.settingReqStatus = 'loading'; |
|
|
@ -138,7 +138,7 @@ export const contextSlice = createSlice({ |
|
|
|
}); |
|
|
|
builder.addCase(saveConfig.rejected, (state, action) => { |
|
|
|
state.settingReqStatus = 'failed'; |
|
|
|
state.error = action.payload as string; |
|
|
|
state.error = action.error.message; |
|
|
|
}); |
|
|
|
builder.addCase(refreshSyncProgress.fulfilled, (state, action) => { |
|
|
|
if (action.payload) { |
|
|
|