import type { Metadata } from "next"; import { redirect } from "next/navigation"; import { auth } from "@/auth"; import { BookmarkManager } from "./bookmark-manager"; export const metadata: Metadata = { title: "书签管理", }; export default async function BookmarksPage() { const session = await auth(); const role = (session?.user as { role?: string } | undefined)?.role; if (role !== "admin") redirect("/unauthorized"); return ; }