mirror of
https://github.com/pawelmalak/flame.git
synced 2025-08-07 11:55:17 +02:00
Fixed state bug while updating categories. Fixed bug with bookmarks not being displayed under categories.
This commit is contained in:
parent
0d5a4c418e
commit
f127a354ef
5 changed files with 18 additions and 14 deletions
|
@ -69,7 +69,10 @@ export const bookmarksReducer = (
|
|||
...state,
|
||||
categories: [
|
||||
...state.categories.slice(0, pinnedCategoryIdx),
|
||||
action.payload,
|
||||
{
|
||||
...action.payload,
|
||||
bookmarks: [...state.categories[pinnedCategoryIdx].bookmarks],
|
||||
},
|
||||
...state.categories.slice(pinnedCategoryIdx + 1),
|
||||
],
|
||||
};
|
||||
|
@ -96,7 +99,10 @@ export const bookmarksReducer = (
|
|||
...state,
|
||||
categories: [
|
||||
...state.categories.slice(0, updatedCategoryIdx),
|
||||
action.payload,
|
||||
{
|
||||
...action.payload,
|
||||
bookmarks: [...state.categories[updatedCategoryIdx].bookmarks],
|
||||
},
|
||||
...state.categories.slice(updatedCategoryIdx + 1),
|
||||
],
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue