degmods.com/src/components/GameCard.tsx

25 lines
558 B
TypeScript
Raw Normal View History

2024-07-11 12:15:03 +00:00
import '../styles/cardGames.css'
import { handleGameImageError } from '../utils'
2024-07-11 12:15:03 +00:00
type GameCardProps = {
title: string
imageUrl: string
2024-07-11 12:15:03 +00:00
}
export const GameCard = ({ title, imageUrl }: GameCardProps) => {
2024-07-11 12:15:03 +00:00
return (
<a className='cardGameMainWrapperLink' href='search.html'>
2024-09-02 09:49:53 +00:00
<div className='cardGameMainWrapper'>
2024-09-02 09:48:51 +00:00
<img
src={imageUrl}
onError={handleGameImageError}
className='cardGameMain'
/>
</div>
2024-07-11 12:15:03 +00:00
<div className='cardGameMainTitle'>
<p>{title}</p>
2024-07-11 12:15:03 +00:00
</div>
</a>
)
}