mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-27 13:52:47 -07:00
30 lines
538 B
TypeScript
30 lines
538 B
TypeScript
import type { JSX } from 'react'
|
|
import { Link } from 'tuono'
|
|
|
|
import styles from './PokemonLink.module.css'
|
|
|
|
interface Pokemon {
|
|
name: string
|
|
}
|
|
|
|
export default function PokemonLink({
|
|
pokemon,
|
|
id,
|
|
}: {
|
|
pokemon: Pokemon
|
|
id: number
|
|
}): JSX.Element {
|
|
return (
|
|
<Link
|
|
className={styles.link}
|
|
href={`/pokemons/${pokemon.name}`}
|
|
id={pokemon.name}
|
|
>
|
|
{pokemon.name}
|
|
<img
|
|
src={`https://raw.githubusercontent.com/PokeAPI/sprites/master/sprites/pokemon/${id}.png`}
|
|
/>
|
|
</Link>
|
|
)
|
|
}
|