diff --git a/src/App.css b/src/App.css index 5f116bc..f6ead71 100644 --- a/src/App.css +++ b/src/App.css @@ -190,8 +190,8 @@ button:hover:not(:disabled) { } .random-cat-image { - max-width: 100%; - height: auto; + max-width: 25%; + height: 30%; border-radius: 10px; } diff --git a/src/App.js b/src/App.js index 917bf7b..9a1e922 100644 --- a/src/App.js +++ b/src/App.js @@ -20,7 +20,7 @@ const App = () => { const fetchCats = async () => { try { setLoading(true); - let queryParams = `?limit=20&page=${page}`; + let queryParams = `?limit=100&page=${page}`; if (filters.breed) queryParams += `&breed_ids=${filters.breed}`; if (filters.hairLength) queryParams += `&hair_length=${filters.hairLength}`; @@ -34,9 +34,10 @@ const App = () => { ); if (!response.ok) throw new Error("Failed to fetch data"); - const data = await response.json(); - setCats((prevCats) => (page === 1 ? data : [...prevCats, ...data])); + const filterData = data.filter(item =>item.breeds.length !== 0); + setCats((prevCats) => (page === 1 ? filterData : [...prevCats, ...filterData])); + } catch (err) { console.error(err.message); diff --git a/src/env.js b/src/env.js deleted file mode 100644 index 63cb8d3..0000000 --- a/src/env.js +++ /dev/null @@ -1 +0,0 @@ -export const apiKey = "y816dBD1X9XGamg1kmSqSQ==wxo8g9UjpUo9r4HE"; \ No newline at end of file diff --git a/src/utils/api.js b/src/utils/api.js deleted file mode 100644 index e69de29..0000000