--- import Layout from "../layouts/Layout.astro"; import type { Post } from "../types"; const posts: Post[] = ( await (await fetch("http://payload:3001/api/posts")).json() ).docs; posts.forEach((post) => console.log(post.title)); ---

This is Astroad

{ posts ? ( posts.reverse().map((post) => (

{post.title}

{new Date(post.updatedAt).toLocaleDateString("de-DE")}

)) ) : (

No posts...

) }