From 8a95c4feaf2ccf8766c2dae1ca1b677241a0b3bc Mon Sep 17 00:00:00 2001 From: Chanson4 Date: Mon, 28 Sep 2026 17:43:45 +0800 Subject: [PATCH] feat: start practice from question bank --- web/components/learning/practice/PracticePage.tsx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/web/components/learning/practice/PracticePage.tsx b/web/components/learning/practice/PracticePage.tsx index 1168fedff..9d8623797 100644 --- a/web/components/learning/practice/PracticePage.tsx +++ b/web/components/learning/practice/PracticePage.tsx @@ -16,7 +16,7 @@ import { PracticeImport } from "./PracticeImport"; import { PracticeSession } from "./PracticeSession"; import { PracticeInsights } from "./PracticeInsights"; -/** Shared collections and imports; the library surface omits practice-only tools. */ +/** Shared collections and imports; both surfaces can start a manual practice session. */ export function PracticePage({ mode = "practice" }: { mode?: "practice" | "library" }) { const search = useSearchParams(); if (mode === "practice" && !search.has("course") && !search.has("question")) return ; @@ -264,14 +264,10 @@ function ScopedPracticePage({ mode, initialImport }: { mode: "practice" | "libra embedded onChanged={refresh} mistakesOnly={tab === "mistakes"} - onPractice={ - libraryOnly - ? undefined - : ids => { - setSession(ids); - setNotice(""); - } - } + onPractice={ids => { + setSession(ids); + setNotice(""); + }} />