(post: Post)
| 4 | import { getMDXComponent } from "next-contentlayer/hooks"; |
| 5 | |
| 6 | function PostCard(post: Post) { |
| 7 | const Content = getMDXComponent(post.body.code); |
| 8 | |
| 9 | return ( |
| 10 | <div className="mb-8"> |
| 11 | <h2 className="text-xl"> |
| 12 | <Link |
| 13 | href={post.url} |
| 14 | className="text-blue-700 hover:text-blue-900" |
| 15 | legacyBehavior> |
| 16 | {post.title} |
| 17 | </Link> |
| 18 | </h2> |
| 19 | <time dateTime={post.date} className="block mb-2 text-xs text-gray-600"> |
| 20 | {format(parseISO(post.date), "LLLL d, yyyy")} |
| 21 | </time> |
| 22 | <div className="text-sm"> |
| 23 | <Content /> |
| 24 | </div> |
| 25 | </div> |
| 26 | ); |
| 27 | } |
| 28 | |
| 29 | export default function Home() { |
| 30 | const posts = allPosts.sort((a, b) => |
nothing calls this directly
no test coverage detected
searching dependent graphs…