mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 17:40:18 +08:00
feat: start practice from question bank
This commit is contained in:
@@ -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>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user