diff --git a/src/components/Resource/ResourceCommentSection.tsx b/src/components/Resource/ResourceCommentSection.tsx index a556f33a186..e4d3d8c29a5 100644 --- a/src/components/Resource/ResourceCommentSection.tsx +++ b/src/components/Resource/ResourceCommentSection.tsx @@ -11,7 +11,7 @@ import TextAreaFormField from "@/components/Form/FormFields/TextAreaFormField"; import routes from "@/Utils/request/api"; import request from "@/Utils/request/request"; -import { formatName } from "@/Utils/utils"; +import { formatName, relativeTime } from "@/Utils/utils"; import { CommentModel } from "@/types/resourceRequest/resourceRequest"; import { Avatar } from "../Common/Avatar"; @@ -85,19 +85,28 @@ const CommentSection = (props: { id: string }) => { export default CommentSection; -export const Comment = ({ comment, created_by }: CommentModel) => ( +export const Comment = ({ + comment, + created_by, + created_date, +}: CommentModel) => (
{comment}
++ {comment.replace(/\n+/g, "\n")} +