import ArticleWithBreadcrumb from "@/app/_components/ArticleWithBreadcrumb";
import ArticleRender from "@/app/_components/ArticleRender";
import { articleDetail } from "@/app/_services/articles";

const Page = async ({
  params,
}: {
  params: {
    articleId: string;
  };
}) => {
  const { articleId } = params;
  const data = await articleDetail({ id: articleId });
  return (
    <>
      <ArticleWithBreadcrumb
        breadcrumb={[
          { title: "首页", href: "/" },
          {
            title: "学术交流",
            href: "/academic-exchange/academic-events/pages/1",
          },
          {
            title: "学术活动",
            href: "/academic-exchange/academic-events/pages/1",
          },
          {
            title: data.title,
            href: `/academic-exchange/academic-events/${data.id}`,
          },
        ]}
      >
        <ArticleRender article={data} />
      </ArticleWithBreadcrumb>
    </>
  );
};

export default Page;
