with time
This commit is contained in:
parent
3d664d98cb
commit
bce0931df9
@ -7,7 +7,7 @@ export default async function Page() {
|
|||||||
const posts = await getPosts();
|
const posts = await getPosts();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="space-y-6">
|
<div className="space-y-6 pt-6">
|
||||||
<Posts posts={posts} />
|
<Posts posts={posts} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -12,14 +12,15 @@ const Posts: FC<PostProps> = ({ posts }) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{posts.map((p) => (
|
{posts.map((p) => (
|
||||||
<div className="space-y-2 text-white">
|
<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="font-bold">@{p.author.name}</p>
|
||||||
<p>{p.title}</p>
|
<p className="italic">{p.title}</p>
|
||||||
<div>
|
<div className="markdown">
|
||||||
{p.message && (
|
{p.message && (
|
||||||
<ReactMarkdown children={p.message} remarkPlugins={[remarkGfm]} />
|
<ReactMarkdown children={p.message} remarkPlugins={[remarkGfm]} />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
<small>{new Date(p.time * 1000).toLocaleString()}</small>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</>
|
</>
|
||||||
|
2
posts
2
posts
@ -1 +1 @@
|
|||||||
Subproject commit 727169ae31de82eaafae68844b7e8189a602205d
|
Subproject commit 83679c8770185b01ad187d0ba673f0989455eaeb
|
@ -1,3 +1,15 @@
|
|||||||
@tailwind base;
|
@tailwind base;
|
||||||
@tailwind components;
|
@tailwind components;
|
||||||
@tailwind utilities;
|
@tailwind utilities;
|
||||||
|
|
||||||
|
.markdown {
|
||||||
|
@apply space-y-2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown ul {
|
||||||
|
@apply pl-4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.markdown li {
|
||||||
|
@apply list-disc;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user