()
| 42 | }); |
| 43 | |
| 44 | const addAnimal = () => { |
| 45 | const possibleAnimals = ['Dog', 'Cat', 'Iguana', 'Zebra']; |
| 46 | const selectedAnimal = possibleAnimals[Math.floor(Math.random() * possibleAnimals.length)]; |
| 47 | addDoc(animalsCollection, { commonName: selectedAnimal }); |
| 48 | }; |
| 49 | |
| 50 | if (status === 'loading') { |
| 51 | return <LoadingSpinner />; |