fix: loading icon and filter menu shows when api call is in progress in my posts tab (#389)

This commit is contained in:
ayesha waris
2022-12-27 18:24:58 +05:00
committed by GitHub
parent 2a5e643562
commit 4eaac1eb03

View File

@@ -57,7 +57,6 @@ const threadsSlice = createSlice({
if (state.author !== payload.author) {
state.pages = [];
state.author = payload.author;
state.totalThreads = null;
}
state.status = RequestStatus.IN_PROGRESS;
},
@@ -161,9 +160,11 @@ const threadsSlice = createSlice({
},
updateThreadFailed: (state) => {
state.postStatus = RequestStatus.FAILED;
state.totalThreads = 0;
},
updateThreadDenied: (state) => {
state.postStatus = RequestStatus.DENIED;
state.totalThreads = 0;
},
deleteThreadRequest: (state) => {
state.postStatus = RequestStatus.IN_PROGRESS;