From f168f240729aef1f7249712a05e31a53f4530866 Mon Sep 17 00:00:00 2001 From: soufiane Date: Tue, 18 Nov 2025 00:29:52 +0100 Subject: [PATCH] fix: add type assertion for PRIZE_CONFIG access in client page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- app/client/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/page.tsx b/app/client/page.tsx index dfc02c2..ccd2e3c 100644 --- a/app/client/page.tsx +++ b/app/client/page.tsx @@ -211,7 +211,7 @@ export default function ClientPage() { {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 (