{
}
{animal.name}
Breed: {animal.breeds.primary}
Color: {animal.colors.primary}
Gender: {animal.gender}
import React, { useEffect, useState } from 'react'; import { getPets } from '../../api/petfinder'; import Hero from '../../components/hero'; // import useParams // import Link const HomePage = () => { const [data, setData] = useState(null); const type = ''; // Fix me! useEffect(() => { async function getPetsData() { const petsData = await getPets(type); setData(petsData); } getPetsData(); }, [type]); if (!data) { return
Breed: {animal.breeds.primary}
Color: {animal.colors.primary}
Gender: {animal.gender}
No {type}s available for adoption now.
)}