mirror of
https://github.com/urosran/cally.git
synced 2025-07-16 01:56:16 +00:00
- Implemented assigning todos
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
import { useQuery } from "react-query";
|
||||
import firestore from "@react-native-firebase/firestore";
|
||||
import { useAuthContext } from "@/contexts/AuthContext";
|
||||
import {UserProfile} from "@/hooks/firebase/types/profileTypes";
|
||||
import {IToDo} from "@/hooks/firebase/types/todoData";
|
||||
|
||||
export const useGetTodos = () => {
|
||||
const { user, profileData } = useAuthContext();
|
||||
@ -17,16 +19,11 @@ export const useGetTodos = () => {
|
||||
const data = doc.data();
|
||||
|
||||
return {
|
||||
...data,
|
||||
id: doc.id,
|
||||
title: data.title,
|
||||
done: data.done,
|
||||
date: data.date ? new Date(data.date.seconds * 1000) : null,
|
||||
points: data.points,
|
||||
rotate: data.points,
|
||||
repeatType: data.repeatType,
|
||||
creatorId: data.creatorId
|
||||
};
|
||||
});
|
||||
}) as IToDo[];
|
||||
}
|
||||
})
|
||||
};
|
Reference in New Issue
Block a user