diff --git a/src/app/analysis/page.tsx b/src/app/analysis/page.tsx index 58f65f4..b16f947 100644 --- a/src/app/analysis/page.tsx +++ b/src/app/analysis/page.tsx @@ -3,7 +3,8 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import { Chess } from "chess.js"; import { Chessboard } from "react-chessboard"; -import { Brain, ChevronLeft, ChevronRight, Loader2 } from "lucide-react"; +import { Brain, ChevronLeft, ChevronRight, Loader2, ArrowLeft } from "lucide-react"; +import { useRouter } from "next/navigation"; import Header from "@/components/Header"; import { SupportedLanguage } from "@/lib/i18n/translations"; @@ -37,6 +38,7 @@ interface StepDetails { const DEFAULT_START = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"; export default function AnalysisPage() { + const router = useRouter(); const [language, setLanguage] = useState("en"); const [apiKey, setApiKey] = useState(null); const t = useTranslation(language); @@ -319,6 +321,21 @@ INSTRUCTIONS: return (
+ + {/* Back Button */} +
+
+ +
+
+
@@ -395,20 +412,22 @@ INSTRUCTIONS:
{t.analysis.step} {currentIndex} / {steps.length}