Added tag support + Post link and many more changes and optimizations.

This commit is contained in:
Daniel
2023-02-24 21:02:28 +03:30
parent e0f4c71eb2
commit 9b53608097
36 changed files with 1062 additions and 176 deletions
-15
View File
@@ -41,21 +41,6 @@ const useCollectionSlice = create<CollectionSlice>()((set) => ({
),
})),
removeCollection: (collectionId) => {
// await fetch("/api/routes/collections/postCollection", {
// body: JSON.stringify({ collectionName }),
// headers: {
// "Content-Type": "application/json",
// },
// method: "POST",
// })
// .then((res) => res.json())
// .then((data) => {
// console.log(data);
// set((state) => ({
// collections: [...state.collections, data.response],
// }));
// });
set((state) => ({
collections: state.collections.filter((c) => c.id !== collectionId),
}));