feat: start practice from question bank

This commit is contained in:
Chanson4
2026-09-28 17:43:45 +08:00
parent ef2d9e5c3c
commit 8a95c4feaf

View File

@@ -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 <ReviewHome />;
@@ -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("");
}}
/>
</div>
</>