'use client'; import Image from 'next/image'; import { cleanImageUrl, getRarityColor, getRarityLabel, type Reward } from '../lib/rewards'; interface RewardCardProps { reward: Reward; showValue?: boolean; className?: string; } export default function RewardCard({ reward, showValue = true, className = '' }: RewardCardProps) { return (
{reward.image && (
{reward.name} { // Fallback to emoji if image fails to load e.currentTarget.style.display = 'none'; e.currentTarget.nextElementSibling?.classList.remove('hidden'); }} />
🎯
)}

{reward.name}

{getRarityLabel(reward.price)}
{showValue && (

Value: ${reward.price}

)}
); }