From f943c8768bb05b69dde03b1b1f4c446a01792369 Mon Sep 17 00:00:00 2001 From: Francisco Imanol Suarez Date: Wed, 28 Apr 2021 10:19:16 -0300 Subject: [PATCH] Update Details Dear, as an attachment in the problem #136 when you throw this error, the way I found on the internet to solve it is with parseInt. I am looking forward to your response. https://github.com/btholt/complete-intro-to-react-v5/issues/136 --- src/Details.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Details.js b/src/Details.js index f083b1dc..357f02fc 100644 --- a/src/Details.js +++ b/src/Details.js @@ -10,7 +10,7 @@ class Details extends React.Component { state = { loading: true, showModal: false }; componentDidMount() { pet - .animal(this.props.id) + .animal(parseInt(this.props.id)) .then(({ animal }) => { this.setState({ url: animal.url, @@ -82,4 +82,4 @@ export default function DetailsErrorBoundary(props) {
); -} \ No newline at end of file +}