Files
darkwave/app/page.tsx

20 lines
537 B
TypeScript
Raw Normal View History

import { getSortedPostsData } from '@/lib/posts';
import BlogArea from '@/components/blogpost';
2025-03-01 06:33:09 +03:00
export default function Home() {
const blogposts = getSortedPostsData();
const formattedPosts = blogposts.map(post => ({
label: post.title,
body: post.description,
publish: new Date(post.date).toLocaleDateString('ru-RU', {
day: 'numeric',
month: 'long',
year: 'numeric',
}),
get_absolute_url: `/post/${post.slug}`,
tags: post.tags,
}));
return <BlogArea blogposts={formattedPosts} />;
}