import { getPosts } from '@/lib/getPosts'; import { cookies } from 'next/headers'; import { use } from 'react'; import ReactMarkdown from 'react-markdown'; import remarkGfm from 'remark-gfm'; const Posts = () => { const c = cookies(); const posts = use(getPosts()); return ( <> {posts.map((p) => (

@{p.author.name}

{p.title}

{p.message && ( )}
{new Date(p.time * 1000).toLocaleString()}
))} ); }; export default Posts;