17 lines
534 B
TypeScript
17 lines
534 B
TypeScript
import { PostsManager } from '@/components/admin/PostsManager';
|
|
import { requireContentStaff } from '@/lib/server/auth';
|
|
import { listAuthors, listTags } from '@/lib/server/content';
|
|
|
|
export const dynamic = 'force-dynamic';
|
|
|
|
export default async function AdminPostsPage() {
|
|
await requireContentStaff();
|
|
const [authors, tags] = await Promise.all([listAuthors(), listTags()]);
|
|
return (
|
|
<PostsManager
|
|
authors={authors.map((a) => ({ id: a.id, name: a.name }))}
|
|
tagOptions={tags.map((tag) => tag.name)}
|
|
/>
|
|
);
|
|
}
|