[questions][fix] show line breaks in answers, comments

pull/531/head
Jeff Sieu 2 years ago
parent ebc98e85bc
commit e32c7efab2

@ -53,7 +53,7 @@ export default function AnswerCard({
Posted on: {format(createdAt, 'h:mm a, MMMM dd, yyyy')} Posted on: {format(createdAt, 'h:mm a, MMMM dd, yyyy')}
</p> </p>
</div> </div>
<p>{content}</p> <p className="whitespace-pre-line">{content}</p>
{commentCount !== undefined && ( {commentCount !== undefined && (
<div className="flex items-center gap-2 text-slate-500"> <div className="flex items-center gap-2 text-slate-500">
<ChatBubbleLeftRightIcon className="h-6 w-6" /> <ChatBubbleLeftRightIcon className="h-6 w-6" />

@ -44,7 +44,7 @@ export default function CommentListItem({
Posted on: {format(createdAt, 'h:mm a, MMMM dd, yyyy')} Posted on: {format(createdAt, 'h:mm a, MMMM dd, yyyy')}
</p> </p>
</div> </div>
<p className="pl-1 pt-1">{content}</p> <p className="whitespace-pre-line">{content}</p>
</div> </div>
</div> </div>
); );

Loading…
Cancel
Save