fix: add type assertion for PRIZE_CONFIG access in client page

Add type assertion to handle prize types that may not exist in PRIZE_CONFIG
(PHYSICAL, DISCOUNT, GRAND_PRIZE). This prevents TypeScript compilation errors
when accessing the PRIZE_CONFIG object with dynamic prize types.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
soufiane 2025-11-18 00:29:52 +01:00
parent e422f13bed
commit f168f24072

View File

@ -211,7 +211,7 @@ export default function ClientPage() {
<tbody className="bg-white divide-y divide-gray-200">
{tickets.slice(0, 5).map((ticket) => {
const prizeConfig = ticket.prize
? PRIZE_CONFIG[ticket.prize.type]
? PRIZE_CONFIG[ticket.prize.type as keyof typeof PRIZE_CONFIG]
: null;
return (