mirror of
https://github.com/urosran/cally.git
synced 2025-07-16 01:56:16 +00:00
- FIxed an issue with completing todos
This commit is contained in:
@ -13,12 +13,12 @@ export const useUpdateTodo = () => {
|
||||
mutationKey: ["updateTodo"],
|
||||
mutationFn: async (todoData: Partial<IToDo>) => {
|
||||
try {
|
||||
const snapshot = await firestore()
|
||||
.collection("Todos")
|
||||
.where("connectedTodoId", "==", todoData.connectedTodoId)
|
||||
.get();
|
||||
|
||||
if (todoData.connectedTodoId) {
|
||||
console.log("CONNECTED")
|
||||
const snapshot = await firestore()
|
||||
.collection("Todos")
|
||||
.where("connectedTodoId", "==", todoData.connectedTodoId)
|
||||
.get();
|
||||
const connectedTodos = snapshot.docs.map((doc) => {
|
||||
const data = doc.data();
|
||||
|
||||
|
Reference in New Issue
Block a user