Add note on comment when edited
This commit is contained in:
@@ -89,6 +89,7 @@ function CommentThreadItem({
|
||||
const [data, setData] = React.useState(toJS(comment.data));
|
||||
const showAuthor = firstOfAuthor;
|
||||
const showTime = useShowTime(comment.createdAt, previousCommentCreatedAt);
|
||||
const showEdited = comment.updatedAt !== comment.createdAt;
|
||||
const [isEditing, setEditing, setReadOnly] = useBoolean();
|
||||
const formRef = React.useRef<HTMLFormElement>(null);
|
||||
|
||||
@@ -158,6 +159,16 @@ function CommentThreadItem({
|
||||
shorten
|
||||
/>
|
||||
)}
|
||||
{showEdited && (
|
||||
<>
|
||||
{" "}
|
||||
(
|
||||
<Time dateTime={comment.updatedAt} tooltipDelay={500}>
|
||||
{t("edited")}
|
||||
</Time>
|
||||
)
|
||||
</>
|
||||
)}
|
||||
</Meta>
|
||||
)}
|
||||
<Body ref={formRef} onSubmit={handleSubmit}>
|
||||
|
||||
Reference in New Issue
Block a user