degmods.com/src/components/GameCard.tsx

25 lines
557 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:48:51 +00:00
<div className='cardGameMainWrapper'
<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>
)
}