29 lines
926 B
TypeScript
29 lines
926 B
TypeScript
"use server"
|
|
|
|
import { BlogInterface, posts } from "@/components/blog";
|
|
import BlogItem, { BlogItemParams } from "@/components/blogItem";
|
|
|
|
export default async function HistoryDetails({
|
|
params,
|
|
}: {
|
|
params: Promise<{ slug: string }>;
|
|
}) {
|
|
const { slug } = await params;
|
|
|
|
const blog_item: BlogInterface = posts.find((value) => value.slug == slug) as BlogInterface
|
|
|
|
const blog_item_params: BlogItemParams = {
|
|
slug: slug,
|
|
title_style: "py-12 mb-3 text-pretty text-xl font-semibold md:mb-4 md:text-4xl lg:mb-6 lg:max-w-3xl lg:text-3xl",
|
|
subtitle_style: "py-12 mb-3 text-pretty text-xl font-semibold md:mb-4 md:text-4xl lg:mb-6 lg:max-w-3xl lg:text-3xl"
|
|
,
|
|
p_style: "blog-paragraph mb-5 text-muted-foreground md:text-base lg:max-w-2xl lg:text-lg",
|
|
default_img: "https://shadcnblocks.com/images/block/placeholder-dark-1.svg",
|
|
blog_content: blog_item,
|
|
}
|
|
|
|
return (
|
|
<BlogItem params={blog_item_params} />
|
|
)
|
|
}
|