much improved collections listing page

This commit is contained in:
Daniel
2023-05-25 22:14:08 +03:30
parent 0f5f93eaff
commit 824f7c2789
6 changed files with 287 additions and 170 deletions
+2 -2
View File
@@ -23,6 +23,8 @@ const useCollectionStore = create<CollectionStore>()((set) => ({
const data = await response.json();
console.log(data);
if (response.ok) set({ collections: data.response });
},
addCollection: async (body) => {
@@ -36,8 +38,6 @@ const useCollectionStore = create<CollectionStore>()((set) => ({
const data = await response.json();
console.log(data);
if (response.ok)
set((state) => ({
collections: [...state.collections, data.response],