- 用 Deck 替换 Folder - 用 Note + Card 替换 Pair (双向复习) - 添加 NoteType (卡片模板) - 添加 Revlog (复习历史) - 实现 SM-2 间隔重复算法 - 更新所有前端页面 - 添加数据库迁移
17 lines
405 B
TypeScript
17 lines
405 B
TypeScript
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} />;
|
|
}
|