import Link from 'next/link';
import { BlogPostDataEntry } from '@nx/nx-dev/data-access-documents/node-only';
import { BlogAuthors } from './authors';
export interface MoreBlogsProps {
blogs: BlogPostDataEntry[];
}
export function MoreBlogs({ blogs }: MoreBlogsProps) {
return (
<>
More blogs
{blogs?.map((post) => {
const formattedDate = new Date(post.date).toLocaleDateString(
'en-US',
{
month: 'short',
day: '2-digit',
year: 'numeric',
}
);
const tags = post.tags.map(
(tag) => `${tag.substring(0, 1).toUpperCase()}${tag.substring(1)}`
);
return (
{post.title}
{tags.join(', ')}
{formattedDate}
);
})}
>
);
}