update
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
import { ReactNode } from "react";
|
||||
import ArticleLayout from "@/app/components/ArticleLayout";
|
||||
import Breadcrumb from "@/app/components/Breadcrumb";
|
||||
|
||||
const Layout = ({
|
||||
children,
|
||||
@ -12,10 +11,7 @@ const Layout = ({
|
||||
}) => {
|
||||
return (
|
||||
<ArticleLayout leftNavTitle={"新闻详情"} navigations={[]}>
|
||||
<div className={"flex flex-col h-full"}>
|
||||
<Breadcrumb navigations={[]} />
|
||||
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
|
||||
</div>
|
||||
{children}
|
||||
</ArticleLayout>
|
||||
);
|
||||
};
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { articleDetail } from "@/app/api/articles";
|
||||
import ArticleContent from "@/app/components/ArticleContent";
|
||||
import ArticleRender from "@/app/components/ArticleRender";
|
||||
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
|
||||
|
||||
export default async function Article({
|
||||
params,
|
||||
@ -9,5 +10,15 @@ export default async function Article({
|
||||
};
|
||||
}) {
|
||||
const data = await articleDetail({ id: params.articleId });
|
||||
return <ArticleContent article={data} />;
|
||||
return (
|
||||
<ArticleWithBreadcrumb
|
||||
breadcrumb={[
|
||||
{ title: "首页", href: "/" },
|
||||
{ title: "公告通知", href: "/announcements/pages/1" },
|
||||
{ title: data.title, href: `/announcements/${data.id}` },
|
||||
]}
|
||||
>
|
||||
<ArticleRender article={data} />
|
||||
</ArticleWithBreadcrumb>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user