with time

This commit is contained in:
2022-11-06 21:36:43 +01:00
parent 3d664d98cb
commit bce0931df9
4 changed files with 19 additions and 6 deletions

View File

@@ -12,14 +12,15 @@ const Posts: FC<PostProps> = ({ posts }) => {
return (
<>
{posts.map((p) => (
<div className="space-y-2 text-white">
<p className="font-bold">{p.author.name}</p>
<p>{p.title}</p>
<div>
<div className="space-y-2 rounded-md border border-solid border-gray-700 p-4 text-white">
<p className="font-bold">@{p.author.name}</p>
<p className="italic">{p.title}</p>
<div className="markdown">
{p.message && (
<ReactMarkdown children={p.message} remarkPlugins={[remarkGfm]} />
)}
</div>
<small>{new Date(p.time * 1000).toLocaleString()}</small>
</div>
))}
</>