diff --git a/src/Details.js b/src/Details.js index f083b1dc..29f34388 100644 --- a/src/Details.js +++ b/src/Details.js @@ -21,11 +21,11 @@ class Details extends React.Component { }`, description: animal.description, media: animal.photos, - breed: animal.breeds.primary, - loading: false + breed: animal.breeds.primary }); }) - .catch(err => this.setState({ error: err })); + .catch(err => this.setState({ error: err })) + .finally(() => this.setState({ loading: false })); } toggleModal = () => this.setState({ showModal: !this.state.showModal }); adopt = () => navigate(this.state.url); @@ -82,4 +82,4 @@ export default function DetailsErrorBoundary(props) {
); -} \ No newline at end of file +} diff --git a/src/SearchParams.js b/src/SearchParams.js index e8625a2a..e4c6db9a 100644 --- a/src/SearchParams.js +++ b/src/SearchParams.js @@ -18,9 +18,6 @@ const SearchParams = () => { breed, type: animal }); - - console.log("animals", animals); - setPets(animals || []); } @@ -73,4 +70,4 @@ const SearchParams = () => { ); }; -export default SearchParams; \ No newline at end of file +export default SearchParams;