added support for nested collection (backend)

This commit is contained in:
daniel31x13
2024-02-03 07:57:29 -05:00
parent 8534572662
commit dba2453453
9 changed files with 158 additions and 25 deletions
+5 -1
View File
@@ -78,7 +78,11 @@ const useCollectionStore = create<CollectionStore>()((set) => ({
if (response.ok) {
set((state) => ({
collections: state.collections.filter((e) => e.id !== collectionId),
collections: state.collections.filter(
(collection) =>
collection.id !== collectionId &&
collection.parentId !== collectionId
),
}));
useTagStore.getState().setTags();
}