import { articleDetail } from "@/app/api/articles";
import ArticleRender from "@/app/components/ArticleRender";
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";

export default async function Article({
  params,
}: {
  params: {
    articleId: string;
  };
}) {
  const data = await articleDetail({ id: params.articleId });
  return (
    <ArticleWithBreadcrumb
      breadcrumb={[
        { title: "首页", href: "/" },
        { title: "公告通知", href: "/announcements/pages/1" },
        { title: data.title, href: `/announcements/${data.id}` },
      ]}
    >
      <ArticleRender article={data} />
    </ArticleWithBreadcrumb>
  );
}
