From 9c6eb46249e05dbc649c6ec7dff2c85698c653bc Mon Sep 17 00:00:00 2001 From: Andrea Papaleo Date: Tue, 23 Jul 2024 13:02:44 -0400 Subject: [PATCH] [fix] reoves duplicate Image kind when resetting data - merge error --- src/store/data/dataSlice.ts | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/src/store/data/dataSlice.ts b/src/store/data/dataSlice.ts index 99c155c3..a7a501ff 100644 --- a/src/store/data/dataSlice.ts +++ b/src/store/data/dataSlice.ts @@ -72,22 +72,7 @@ export const dataSlice = createSlice({ initialState: initialState, reducers: { resetData: (state) => { - const newState = initialState(); - const newUnknownCategory = generateUnknownCategory("Image"); - const imageKind = { - id: "Image", - categories: [newUnknownCategory.id], - containing: [], - unknownCategoryId: newUnknownCategory.id, - } as Kind; - newState.kinds.ids.push(imageKind.id); - newState.kinds.entities[imageKind.id] = { saved: imageKind, changes: {} }; - newState.categories.ids.push(newUnknownCategory.id); - newState.categories.entities[newUnknownCategory.id] = { - saved: newUnknownCategory, - changes: {}, - }; - return newState; + return initialState(); }, initializeState( state,