From 1dd4a2996c3b7c5746d9f0bb1c6065d1e1de4ed5 Mon Sep 17 00:00:00 2001 From: Aman Chaturvedi Date: Fri, 9 Dec 2022 14:35:37 +0530 Subject: [PATCH] all cases reducer added --- src/components/screens/allCases/allCasesSlice.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/components/screens/allCases/allCasesSlice.ts b/src/components/screens/allCases/allCasesSlice.ts index 75b52785..a835ac0b 100644 --- a/src/components/screens/allCases/allCasesSlice.ts +++ b/src/components/screens/allCases/allCasesSlice.ts @@ -46,16 +46,23 @@ const allCasesSlice = createSlice({ if (todoList.length) { todoList.unshift({ type: Type.TODO_HEADER, - caseId: -1, + caseId: -2, } as Data); if (otherCasesList.length) { otherCasesList.unshift({ type: Type.CASES_HEADER, - caseId: -2, + caseId: -3, } as Data); } } - state.compiledList = [...todoList, ...otherCasesList]; + state.compiledList = [ + { + type: Type.FILTER, + caseId: -1, + } as Data, + ...todoList, + ...otherCasesList, + ]; state.casesListMap = list; state.casesList = action.payload; state.otherCasesList = action.payload;