feat: add link to comment list
This commit is contained in:
parent
8339f63584
commit
c6cc919fdd
|
|
@ -195,6 +195,6 @@
|
|||
"Comments": "评论",
|
||||
"You can subscribe to comments through an RSS reader to receive timely reminders.": "你可以通过 RSS 阅读器订阅评论,以便及时收到提醒。",
|
||||
"Subscription address:": "订阅地址:",
|
||||
"comment on your {{type}} {{toTitle}}" : "评论了你的{{type}}「{{toTitle}}」",
|
||||
"comment on your" : "评论了你的{{type}}「<tolink>{{toTitle}}</tolink>」",
|
||||
"{{newCount}} new comments" : "{{newCount}} 条新评论"
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { GetServerSideProps } from "next"
|
||||
import { useTranslation } from "next-i18next"
|
||||
import { Trans, useTranslation } from "next-i18next"
|
||||
import { useRouter } from "next/router"
|
||||
import type { ReactElement } from "react"
|
||||
import { Virtuoso } from "react-virtuoso"
|
||||
|
|
@ -52,7 +52,7 @@ export default function CommentsPage() {
|
|||
</p>
|
||||
<p>
|
||||
{t("Subscription address:")}{" "}
|
||||
<UniLink className="underline" href={feedUrl}>
|
||||
<UniLink className="text-accent" href={feedUrl} target="_blank">
|
||||
{feedUrl}
|
||||
</UniLink>
|
||||
</p>
|
||||
|
|
@ -95,12 +95,27 @@ export default function CommentsPage() {
|
|||
<div key={comment.transactionHash} className="mt-6">
|
||||
<div>
|
||||
{name}{" "}
|
||||
{t("comment on your {{type}} {{toTitle}}", {
|
||||
type: t(type || "", {
|
||||
ns: "common",
|
||||
}),
|
||||
toTitle: toTitle,
|
||||
})}
|
||||
<Trans
|
||||
i18nKey="comment on your"
|
||||
values={{
|
||||
type: t(type || "", {
|
||||
ns: "common",
|
||||
}),
|
||||
toTitle,
|
||||
}}
|
||||
defaults="commented on your {{type}} <tolink>{{toTitle}}</tolink>"
|
||||
components={{
|
||||
tolink: (
|
||||
<UniLink
|
||||
href={`/api/redirection?characterId=${comment.characterId}¬eId=${comment.noteId}`}
|
||||
target="_blank"
|
||||
>
|
||||
.
|
||||
</UniLink>
|
||||
),
|
||||
}}
|
||||
ns="dashboard"
|
||||
/>
|
||||
:
|
||||
</div>
|
||||
<CommentItem
|
||||
|
|
|
|||
Loading…
Reference in New Issue