A Test Post
Closed this issue · 4 comments
m4xshen commented
This is just a test post........
m4xshen commented
First!
m4xshen commented
how about this
m4xshen commented
Maybe you can also write code here ...?
import { Avatar, Link } from '@nextui-org/react';
import { getComments } from '@/utils/post';
import MarkdownWrapper from '../MarkdownWrapper';
export default async function Comments({ number }: { number: number }) {
const comments = await getComments(number);
if (!comments.length) {
return <div>There are no comments yet.</div>;
}
return comments.map((comment) => (
<div key={comment.id} className="flex gap-3">
<Avatar src={comment.user?.avatar_url} className="flex-shrink-0" />
<div className="grid w-full gap-3">
<div className="flex items-center gap-3">
<Link href={comment.user?.html_url}>@{comment.user?.login}</Link>
<span className="text-sm">
{new Date(comment.created_at).toDateString()}
</span>
</div>
<div className="prose rounded-xl border border-secondary p-5 dark:prose-invert">
<MarkdownWrapper>{comment.body}</MarkdownWrapper>
</div>
</div>
</div>
));
}
Let's try this.
m4xshen commented
Looks great...
h1
h2
- hi
- hello
- from
- test