Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Oct 24, 2023
1 parent e7dda6c commit 2d5092a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 44 deletions.
43 changes: 0 additions & 43 deletions packages/docs/public/index.html

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@ function Character(props) {
fetch(`https://swapi.dev/api/people/${props.id}/`),
);

if (status !== 'success') {
if (status !== 'success' && status !== 'error') {
return null;
}

if (status === 'error') {
return `- error fetching id: ${id}`;
}

return (
<article key={id}>
<Link to={`/characters/${id}`}>
Expand Down

0 comments on commit 2d5092a

Please sign in to comment.