2026-07-16 16:41:56 -05:00
|
|
|
import Link from "next/link"
|
2026-07-23 20:13:59 -05:00
|
|
|
import {ArrowLeftIcon} from "@heroicons/react/24/solid"
|
|
|
|
|
import {getArticleData} from "@/lib/articles";
|
2026-07-16 16:41:56 -05:00
|
|
|
|
2026-07-23 20:13:59 -05:00
|
|
|
const Article = async ({params}: { params: Promise<{ slug: string }> }) => {
|
|
|
|
|
const {slug} = await params;
|
2026-07-16 16:41:56 -05:00
|
|
|
const articleData = await getArticleData(slug);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<section className={"mx-auto w-10/12 md:w-1/2 mt-20 flex flex-col gap-5"}>
|
|
|
|
|
<div className={"flex justify-between font-poppins"}>
|
|
|
|
|
<Link href={"/blog"} className={"flex flex-row gap-1 place-items-center"}>
|
2026-07-23 20:13:59 -05:00
|
|
|
<ArrowLeftIcon width={20}/>
|
2026-07-16 16:41:56 -05:00
|
|
|
<p>blog homepage</p>
|
|
|
|
|
</Link>
|
|
|
|
|
<p>{articleData.date.toString()}</p>
|
|
|
|
|
</div>
|
2026-07-23 20:13:59 -05:00
|
|
|
<article className={"article"} dangerouslySetInnerHTML={{__html: articleData.contentHtml}}/>
|
2026-07-16 16:41:56 -05:00
|
|
|
</section>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default Article;
|