bugfix
This commit is contained in:
19
app/(articles)/media-scan/[articleId]/layout.tsx
Normal file
19
app/(articles)/media-scan/[articleId]/layout.tsx
Normal 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;
|
24
app/(articles)/media-scan/[articleId]/page.tsx
Normal file
24
app/(articles)/media-scan/[articleId]/page.tsx
Normal 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: "/media-scan/pages/1" },
|
||||
{ title: data.title, href: `/media-scan/${data.id}` },
|
||||
]}
|
||||
>
|
||||
<ArticleRender article={data} />
|
||||
</ArticleWithBreadcrumb>
|
||||
);
|
||||
}
|
20
app/(articles)/media-scan/pages/[pageIndex]/layout.tsx
Normal file
20
app/(articles)/media-scan/pages/[pageIndex]/layout.tsx
Normal file
@ -0,0 +1,20 @@
|
||||
import { ReactNode } from "react";
|
||||
import ArticleLayout from "@/app/components/ArticleLayout";
|
||||
import Breadcrumb, { BreadcrumbItem } from "@/app/components/Breadcrumb";
|
||||
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
|
||||
|
||||
const breadcrumb: BreadcrumbItem[] = [
|
||||
{ title: "首页", href: "/" },
|
||||
{ title: "媒体扫描", href: "/media-scan/pages/1" },
|
||||
];
|
||||
const Layout = ({ children }: { children: ReactNode }) => {
|
||||
return (
|
||||
<ArticleLayout navigations={[]} leftNavTitle={"媒体扫描"}>
|
||||
<ArticleWithBreadcrumb breadcrumb={breadcrumb}>
|
||||
{children}
|
||||
</ArticleWithBreadcrumb>
|
||||
</ArticleLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export default Layout;
|
18
app/(articles)/media-scan/pages/[pageIndex]/page.tsx
Normal file
18
app/(articles)/media-scan/pages/[pageIndex]/page.tsx
Normal file
@ -0,0 +1,18 @@
|
||||
import ArticleList from "@/app/components/ArticleList";
|
||||
|
||||
const Page = ({
|
||||
params,
|
||||
}: {
|
||||
params: {
|
||||
pageIndex: string;
|
||||
};
|
||||
}) => {
|
||||
const { pageIndex } = params;
|
||||
return (
|
||||
<>
|
||||
<ArticleList title={"媒体扫描"} cid={"8"} pageNo={parseInt(pageIndex)} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Page;
|
Reference in New Issue
Block a user