2026-02-07 21:08:25 +01:00
|
|
|
import { PokemonCard } from './PokemonCard'
|
|
|
|
|
import type { EncounterDetail } from '../types'
|
|
|
|
|
|
|
|
|
|
interface ShinyBoxProps {
|
|
|
|
|
encounters: EncounterDetail[]
|
2026-02-16 20:39:41 +01:00
|
|
|
onEncounterClick?: ((encounter: EncounterDetail) => void) | undefined
|
2026-02-07 21:08:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function ShinyBox({ encounters, onEncounterClick }: ShinyBoxProps) {
|
|
|
|
|
return (
|
2026-02-17 21:08:53 +01:00
|
|
|
<div className="border-2 border-yellow-600 rounded-lg p-4">
|
2026-02-20 20:48:16 +01:00
|
|
|
<h3 className="text-sm font-semibold text-yellow-400 light:text-amber-700 mb-3 flex items-center gap-1.5">
|
2026-02-07 21:08:25 +01:00
|
|
|
<span>✦</span>
|
|
|
|
|
Shiny Box
|
2026-02-17 20:48:42 +01:00
|
|
|
<span className="text-xs font-normal text-text-muted ml-1">
|
2026-02-07 21:08:25 +01:00
|
|
|
{encounters.length} {encounters.length === 1 ? 'shiny' : 'shinies'}
|
|
|
|
|
</span>
|
|
|
|
|
</h3>
|
|
|
|
|
{encounters.length > 0 ? (
|
|
|
|
|
<div className="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 gap-2">
|
|
|
|
|
{encounters.map((enc) => (
|
|
|
|
|
<PokemonCard
|
|
|
|
|
key={enc.id}
|
|
|
|
|
encounter={enc}
|
2026-02-16 20:39:41 +01:00
|
|
|
onClick={onEncounterClick ? () => onEncounterClick(enc) : undefined}
|
2026-02-07 21:08:25 +01:00
|
|
|
/>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
) : (
|
2026-02-17 20:48:42 +01:00
|
|
|
<p className="text-sm text-text-muted text-center py-2">No shinies found yet</p>
|
2026-02-07 21:08:25 +01:00
|
|
|
)}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|