From 8c16c72489745a7dc30f0459ab2fd0c8d2ba1656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=B6rdle=20Bot?= Date: Sat, 24 Jan 2026 13:15:43 +0100 Subject: [PATCH] =?UTF-8?q?Fix:=20Verwende=20gameState.isSolved/isFailed?= =?UTF-8?q?=20direkt=20f=C3=BCr=20Ergebnisanzeige?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Entferne Fallback auf hasWon/hasLost States - isSolved/isFailed werden jetzt direkt aus gameState gelesen - Boolean() Konvertierung für explizite Typ-Sicherheit - Behebt Problem, dass Ergebnisanzeige bei zurückkehrenden Rätseln nicht angezeigt wurde --- components/Game.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/Game.tsx b/components/Game.tsx index a04ae6f..ad2650b 100644 --- a/components/Game.tsx +++ b/components/Game.tsx @@ -169,8 +169,10 @@ export default function Game({ dailyPuzzle, genre = null, isSpecial = false, max if (!gameState) return
{t('loadingState')}
; // Use gameState directly for isSolved/isFailed to ensure consistency when returning to completed puzzles - const isSolved = gameState?.isSolved ?? hasWon; - const isFailed = gameState?.isFailed ?? hasLost; + // Always use gameState values directly - they are the source of truth + // This ensures that when returning to a completed puzzle, the result is shown immediately + const isSolved = Boolean(gameState.isSolved); + const isFailed = Boolean(gameState.isFailed); const handleGuess = (song: any) => { if (isProcessingGuess) return;