Skip to content
Snippets Groups Projects
Commit 721f5bb5 authored by isaacwsolomon's avatar isaacwsolomon
Browse files

Passed todo into title. Now todos are stored in the database

parent b957368d
No related branches found
No related tags found
No related merge requests found
......@@ -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 (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment