import { getAllPosts } from "@/lib/api" import { PostPreview } from "@/components/post-preview" // Make sure this is a Server Component (default in App Router) export default function Home() { // Use synchronous data fetching to avoid suspense issues const posts = getAllPosts() // Sort posts by date (newest first) const sortedPosts = posts.sort((a, b) => new Date(b.metadata.date).getTime() - new Date(a.metadata.date).getTime()) return (

Blog posts

) }