2023-10-27 17:29:50 +08:00
|
|
|
import React from "react";
|
|
|
|
import { ArticleDetail } from "@/app/types/article";
|
2023-10-30 17:29:35 +08:00
|
|
|
import Link from "next/link";
|
2023-10-27 17:29:50 +08:00
|
|
|
|
|
|
|
const ArticleContent = ({ article }: { article: ArticleDetail }) => {
|
|
|
|
return (
|
2023-10-30 17:29:35 +08:00
|
|
|
<div className={"h-full"}>
|
2023-10-27 17:29:50 +08:00
|
|
|
<h1 className={"text-[18px] text-[#054786] text-center font-bold"}>
|
|
|
|
{article.title}
|
|
|
|
</h1>
|
|
|
|
<div dangerouslySetInnerHTML={{ __html: article.content }}></div>
|
2023-10-30 17:29:35 +08:00
|
|
|
<div className={"bottom-nav mt-[27px] mb-[50px]"}>
|
|
|
|
<div className={"prev"}>
|
|
|
|
<span className={"text-base"}>上一篇</span>
|
|
|
|
<Link
|
|
|
|
className={"text-sm text-[#666] ml-8"}
|
|
|
|
href={`./${article.prev?.id}`}
|
|
|
|
>
|
|
|
|
{article.prev?.title ?? "没有了"}
|
|
|
|
</Link>
|
|
|
|
</div>
|
|
|
|
<div className={"next mt-8"}>
|
|
|
|
<span className={"text-base"}>下一篇</span>
|
|
|
|
<Link
|
|
|
|
className={"text-sm text-[#666] ml-8"}
|
|
|
|
href={`./${article.next?.id}`}
|
|
|
|
>
|
|
|
|
{article.next?.title ?? "没有了"}
|
|
|
|
</Link>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-10-27 17:29:50 +08:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default ArticleContent;
|