update
This commit is contained in:
@ -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;
|
@ -0,0 +1,23 @@
|
||||
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
|
||||
import ArticleRender from "@/app/components/ArticleRender";
|
||||
import { articleDetail } from "@/app/api/articles";
|
||||
|
||||
const Page = async ({
|
||||
params,
|
||||
}: {
|
||||
params: {
|
||||
articleId: string;
|
||||
};
|
||||
}) => {
|
||||
const { articleId } = params;
|
||||
const data = await articleDetail({ id: articleId });
|
||||
return (
|
||||
<>
|
||||
<ArticleWithBreadcrumb breadcrumb={[]}>
|
||||
<ArticleRender article={data} />
|
||||
</ArticleWithBreadcrumb>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Page;
|
Reference in New Issue
Block a user