@@ -41,7 +41,7 @@ const defaultInitialState = {
41
41
importedPatients : [ ] ,
42
42
includedPatients : [ ] ,
43
43
excludedPatients : [ ] ,
44
- loading : false ,
44
+ loading : true ,
45
45
canMakeExport : false ,
46
46
deidentifiedBoolean : undefined
47
47
}
@@ -324,20 +324,20 @@ const exploredCohortSlice = createSlice({
324
324
builder . addCase ( logout . fulfilled , ( ) => defaultInitialState )
325
325
builder . addCase ( fetchExploredCohort . pending , ( state ) => ( { ...state , loading : true } ) )
326
326
builder . addCase ( fetchExploredCohort . fulfilled , ( state , { payload } ) => ( { ...state , ...payload , loading : false } ) )
327
- builder . addCase ( fetchExploredCohort . rejected , ( ) => ( { ...defaultInitialState } ) )
327
+ builder . addCase ( fetchExploredCohort . rejected , ( ) => ( { ...defaultInitialState , loading : false } ) )
328
328
builder . addCase ( fetchExploredCohortInBackground . pending , ( state ) => ( { ...state , loading : true } ) )
329
329
builder . addCase ( fetchExploredCohortInBackground . fulfilled , ( state , { payload } ) => ( {
330
330
...state ,
331
331
...payload ,
332
332
loading : false
333
333
} ) )
334
- builder . addCase ( fetchExploredCohortInBackground . rejected , ( ) => ( { ...defaultInitialState } ) )
334
+ builder . addCase ( fetchExploredCohortInBackground . rejected , ( ) => ( { ...defaultInitialState , loading : false } ) )
335
335
builder . addCase ( favoriteExploredCohort . pending , ( state ) => ( { ...state } ) )
336
336
builder . addCase ( favoriteExploredCohort . fulfilled , ( state , { payload } ) => ( {
337
337
...state ,
338
338
...payload
339
339
} ) )
340
- builder . addCase ( favoriteExploredCohort . rejected , ( ) => ( { ...defaultInitialState } ) )
340
+ builder . addCase ( favoriteExploredCohort . rejected , ( ) => ( { ...defaultInitialState , loading : false } ) )
341
341
}
342
342
} )
343
343
0 commit comments