Files
evanpage/frontend/app/bookmarks/page.tsx
evan 37cecaa1ce frontend: add bookmark management and homepage navigation
Admin-only /bookmarks page for managing entries; homepage now renders
public bookmarks as a category-grouped navigation grid (empty state
links admin to the manager). Dashboard gains a recent-bookmarks card,
dock and main layout get a bookmark entry for admins, and the
middleware protects /bookmarks.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 01:51:55 +08:00

23 lines
498 B
TypeScript

import { auth } from "@/auth";
import { redirect } from "next/navigation";
import { BookmarkManager } from "./bookmark-manager";
export default async function BookmarksPage() {
const session = await auth();
if (!session?.user) {
redirect("/login");
}
const role = (session.user as any)?.role;
if (role !== "admin") {
redirect("/unauthorized");
}
return (
<div>
<h1 className="mb-6 text-2xl font-bold"></h1>
<BookmarkManager />
</div>
);
}