Fix Next link with correct info

main
midudev 3 years ago
parent a353b8887a
commit 9f1190ac9e

@ -32,7 +32,7 @@ const PokemonPage = ({ previous, next }) => {
<div className="links">
{previous && <Link to={`/pokemon/${previous.name}`}>Previous</Link>}
<Link to="/">Home</Link>
{next && <Link to={`/pokemon/${previous.name}`}>Next</Link>}
{next && <Link to={`/pokemon/${next.name}`}>Next</Link>}
</div>
<div className={`pokemon-page pokemon-type-${type.name}`}>
<div className="pokemon-image" style={{ backgroundImage: `url(${pokemon.sprites.front_default})` }} />

Loading…
Cancel
Save