补齐问答采纳/重开、投票匿名与有票禁编、悬赏过期退回、抽奖回帖开奖,并接入积分账本与发帖附件可见性。 Co-authored-by: Cursor <cursoragent@cursor.com>
21 lines
639 B
TypeScript
21 lines
639 B
TypeScript
import type { Metadata } from "next";
|
|
import { cookies } from "next/headers";
|
|
import { redirect } from "next/navigation";
|
|
import { authCookieHeader } from "@/lib/cookies";
|
|
import { getMeCached } from "@/lib/serverData";
|
|
import PointsClient from "./PointsClient";
|
|
|
|
export const metadata: Metadata = {
|
|
title: "我的积分",
|
|
robots: { index: false, follow: false },
|
|
};
|
|
|
|
export default async function PointsPage() {
|
|
const cookie = authCookieHeader(await cookies());
|
|
const me = await getMeCached(cookie || undefined);
|
|
if (!me.user) {
|
|
redirect(`/login?redirect=${encodeURIComponent("/points")}`);
|
|
}
|
|
return <PointsClient />;
|
|
}
|