()
| 93 | }; |
| 94 | |
| 95 | const addAnimal = () => { |
| 96 | const possibleAnimals = ['Dog', 'Cat', 'Iguana', 'Zebra']; |
| 97 | const selectedAnimal = possibleAnimals[Math.floor(Math.random() * possibleAnimals.length)]; |
| 98 | addDoc(animalsCollection, { commonName: selectedAnimal }); |
| 99 | }; |
| 100 | |
| 101 | const removeAnimal = (id) => deleteDoc(doc(animalsCollection, id)); |
| 102 |