Skip to content

Commit f21359b

Browse files
committed
Remove some duplicated logic
1 parent 2e246a9 commit f21359b

1 file changed

Lines changed: 0 additions & 15 deletions

File tree

src/collections/todoItems.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -165,21 +165,6 @@ export const todoItemsCollection = createCollection<TodoItemRecord>(
165165
);
166166
},
167167
);
168-
169-
queryClient.setQueriesData<TodoItemRecord[]>(
170-
{ queryKey: todoItemsQueryKey },
171-
(oldData) => {
172-
console.log(
173-
"Updating query cache, oldData:",
174-
oldData?.length,
175-
"items",
176-
);
177-
if (!oldData) return oldData;
178-
return oldData.map((item) =>
179-
item.id === original.id ? { ...item, ...changes } : item,
180-
);
181-
},
182-
);
183168
} catch (_) {
184169
toast.error(`Failed to update todo item "${original.title}"`);
185170

0 commit comments

Comments
 (0)