Skip to content

removing console.log and fixing issues with Details Component #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Details.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -82,4 +82,4 @@ export default function DetailsErrorBoundary(props) {
<Details {...props} />
</ErrorBoundary>
);
}
}
5 changes: 1 addition & 4 deletions src/SearchParams.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ const SearchParams = () => {
breed,
type: animal
});

console.log("animals", animals);

setPets(animals || []);
}

Expand Down Expand Up @@ -73,4 +70,4 @@ const SearchParams = () => {
);
};

export default SearchParams;
export default SearchParams;