- 用 Deck 替换 Folder - 用 Note + Card 替换 Pair (双向复习) - 添加 NoteType (卡片模板) - 添加 Revlog (复习历史) - 实现 SM-2 间隔重复算法 - 更新所有前端页面 - 添加数据库迁移
21 lines
644 B
TypeScript
21 lines
644 B
TypeScript
import { OCRClient } from "./OCRClient";
|
|
import { auth } from "@/auth";
|
|
import { headers } from "next/headers";
|
|
import { actionGetDecksByUserId } from "@/modules/deck/deck-action";
|
|
import type { ActionOutputDeck } from "@/modules/deck/deck-action-dto";
|
|
|
|
export default async function OCRPage() {
|
|
const session = await auth.api.getSession({ headers: await headers() });
|
|
|
|
let decks: ActionOutputDeck[] = [];
|
|
|
|
if (session?.user?.id) {
|
|
const result = await actionGetDecksByUserId(session.user.id as string);
|
|
if (result.success && result.data) {
|
|
decks = result.data;
|
|
}
|
|
}
|
|
|
|
return <OCRClient initialDecks={decks} />;
|
|
}
|