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