feat: markdown comment

This commit is contained in:
DIYgod 2022-10-14 20:23:58 +01:00
parent 0b5398de88
commit 205013496e
No known key found for this signature in database
GPG Key ID: D159328F47A80DCA
3 changed files with 24 additions and 4 deletions

View File

@ -40,7 +40,6 @@
"zoo",
"colojayce",
"stars",
"somehacker",
"nss",
"somehacker",
"novonine",
@ -48,5 +47,8 @@
"qfdk",
"fblauer",
"anxiete",
"batman"
"batman",
"hoho",
"kyleten",
"kumasanki"
]

View File

@ -22,6 +22,7 @@ import { Popover } from "@headlessui/react"
import { FaceSmileIcon } from "@heroicons/react/24/outline"
import { CSB_SCAN } from "~/lib/env"
import { getSiteLink } from "~/lib/helpers"
import { renderPageContent } from "~/markdown"
dayjs.extend(duration)
dayjs.extend(relativeTime)
@ -172,7 +173,7 @@ export const Comment: React.FC<{
/>
</UniLink>
<div className="flex-1 flex flex-col rounded-lg">
<div className="mb-2 text-sm">
<div className="mb-1 text-sm">
<UniLink
href={
comment?.character?.handle &&
@ -196,7 +197,12 @@ export const Comment: React.FC<{
<BlockchainIcon className="w-3 h-3 inline-block" />
</UniLink>
</div>
<div>{comment.metadata?.content?.content}</div>
<div className="prose">
{
renderPageContent(comment.metadata?.content?.content || "")
.element
}
</div>
</div>
</div>
))}

View File

@ -159,3 +159,15 @@
.prose .code-wrapper:hover .copy-button {
@apply inline-flex;
}
.xlog-comment .prose {
@apply leading-normal text-[15px];
}
.xlog-comment .prose blockquote {
@apply my-1;
}
.xlog-comment .prose p {
@apply my-1;
}