This commit is contained in:
quantulr
2023-11-02 10:56:18 +08:00
parent 42d517f0a1
commit 593a8a0bc3
8 changed files with 181 additions and 0 deletions

View File

@ -0,0 +1,19 @@
import { ReactNode } from "react";
import ArticleLayout from "@/app/components/ArticleLayout";
const Layout = ({
children,
}: {
children: ReactNode;
params: {
articleId: string;
};
}) => {
return (
<ArticleLayout leftNavTitle={"分院生活剪影"} navigations={[]}>
{children}
</ArticleLayout>
);
};
export default Layout;

View File

@ -0,0 +1,24 @@
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: "/branch-life-sketch/pages/1" },
{ title: data.title, href: `/branch-life-sketch/${data.id}` },
]}
>
<ArticleRender article={data} />
</ArticleWithBreadcrumb>
);
}