From 721f5bb5cdc8b30d321469c97a243e505a585596 Mon Sep 17 00:00:00 2001
From: isaacwsolomon <isaacwsolomon@gmail.com>
Date: Sun, 11 May 2025 22:12:14 +0200
Subject: [PATCH] Passed todo into title. Now todos are stored in the database

---
 app/screens/list.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/screens/list.tsx b/app/screens/list.tsx
index d90e449..219b06c 100644
--- a/app/screens/list.tsx
+++ b/app/screens/list.tsx
@@ -12,8 +12,9 @@ useEffect(() => {}, []);
 const addTodo = async () => {
   console.log('ADD');
   
-  const doc = await addDoc(collection(FIRESTORE_DB, 'todos'), { title: 'I am a test', done: false });
+  const doc = await addDoc(collection(FIRESTORE_DB, 'todos'), { title: todo, done: false });
   console.log('📝 ~ file: List.tsx:12 ~ addTodo ~ doc:', doc);
+    setTodo('');
 };
 
 return (
-- 
GitLab