import Link from "next/link"; import date from "../util/date"; import { PostMeta } from "../util/slug"; import style from '../styles/recent-posts.module.css'; function RecentPosts({ postsMeta }: { postsMeta: PostMeta[] }) { return (<>
Recent Posts
{postsMeta?.slice(0, 10) .map((post: any) => { return
{post.title} {date.prettyPrint(new Date(post.created_at))}
})}
{ postsMeta.length > 10 &&
More...
} ); } export default RecentPosts;