refactor: 完全重构为 Anki 兼容数据结构
- 用 Deck 替换 Folder - 用 Note + Card 替换 Pair (双向复习) - 添加 NoteType (卡片模板) - 添加 Revlog (复习历史) - 实现 SM-2 间隔重复算法 - 更新所有前端页面 - 添加数据库迁移
This commit is contained in:
16
src/app/decks/page.tsx
Normal file
16
src/app/decks/page.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { auth } from "@/auth";
|
||||
import { DecksClient } from "./DecksClient";
|
||||
import { headers } from "next/headers";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
export default async function DecksPage() {
|
||||
const session = await auth.api.getSession(
|
||||
{ headers: await headers() }
|
||||
);
|
||||
|
||||
if (!session) {
|
||||
redirect("/login?redirect=/decks");
|
||||
}
|
||||
|
||||
return <DecksClient userId={session.user.id} />;
|
||||
}
|
||||
Reference in New Issue
Block a user