Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

fix: html error (section in p)

bautistaaaa0daa0597511
diff --git a/apps/web/src/components/challenge/comments/comment.tsx b/apps/web/src/components/challenge/comments/comment.tsx
index b6583062..2f5e8ad0 100644
--- a/apps/web/src/components/challenge/comments/comment.tsx
+++ b/apps/web/src/components/challenge/comments/comment.tsx
@@ -140,12 +140,7 @@ export function Comment({ comment, readonly = false, rootId, type, queryKey }: C
{data?.pages.flatMap((page) =>
page.comments.map((reply) => (
// this is a reply
- <SingleComment
- comment={reply}
- isReply
- key={reply.id}
- replyQueryKey={replyQueryKey}
- />
+ <SingleComment comment={reply} isReply key={reply.id} replyQueryKey={replyQueryKey} />
)),
)}
</div>
diff --git a/apps/web/src/components/challenge/comments/delete/index.tsx b/apps/web/src/components/challenge/comments/delete/index.tsx
index 16242294..149bbb8c 100644
--- a/apps/web/src/components/challenge/comments/delete/index.tsx
+++ b/apps/web/src/components/challenge/comments/delete/index.tsx
@@ -15,6 +15,7 @@ import {
} from '@repo/ui';
import { deleteComment, type CommentsByChallengeId } from '../comment.action';
import { getRelativeTime } from '~/utils/relativeTime';
+import { Markdown } from '~/components/ui/markdown';
interface CommentDeleteDialogProps extends DialogTriggerProps {
comment: CommentsByChallengeId[number];
@@ -78,11 +79,9 @@ export function CommentDeleteDialog({
</Tooltip>
</div>
</div>
- <p className="w-full break-words pl-[1px] text-sm">
- {/* TODO: <code></code> is <Markdown /> does not wrap long lines causing overflow */}
- {/* <Markdown>{comment.text}</Markdown> */}
- {comment.text}
- </p>
+ <div className="w-full break-words pl-[1px] text-sm">
+ <Markdown>{comment.text}</Markdown>
+ </div>
</div>
<TypographyP>The following comment will be permanently deleted.</TypographyP>
<div className="flex flex-row gap-2">