-
Game History
+
{t.game.gameHistory}
@@ -683,8 +851,8 @@ export default function ChessGame({ gameId, initialFen, initialPgn, initialPerso
| # |
- White |
- Black |
+ {t.game.white} |
+ {t.game.black} |
Eval Δ |
@@ -692,7 +860,7 @@ export default function ChessGame({ gameId, initialFen, initialPgn, initialPerso
{moveHistory.length === 0 ? (
|
- No moves yet.
+ {t.game.noMovesYet}
|
) : (
@@ -757,6 +925,10 @@ export default function ChessGame({ gameId, initialFen, initialPgn, initialPerso
language={language}
onClose={() => setGameOverState(null)}
onNewGame={handleNewGame}
+ onAnalyze={() => {
+ setGameOverState(null);
+ setShowAnalysisModal(true);
+ }}
/>
)}
diff --git a/src/components/GameOverModal.tsx b/src/components/GameOverModal.tsx
index 1a4896b..0cb59b4 100644
--- a/src/components/GameOverModal.tsx
+++ b/src/components/GameOverModal.tsx
@@ -54,9 +54,10 @@ interface GameOverModalProps {
language: SupportedLanguage;
onClose: () => void;
onNewGame: () => void;
+ onAnalyze: () => void;
}
-export function GameOverModal({ result, winner, history, apiKey, language, onClose, onNewGame }: GameOverModalProps) {
+export function GameOverModal({ result, winner, history, apiKey, language, onClose, onNewGame, onAnalyze }: GameOverModalProps) {
const [analysis, setAnalysis] = useState
("");
const [isLoading, setIsLoading] = useState(true);
const [mistakes, setMistakes] = useState([]);
@@ -329,6 +330,13 @@ Plain text paragraph (2-3 sentences).
>
Close
+