From 91f3c2b2da359b8ab2e174adf878cf2bdaf2ac84 Mon Sep 17 00:00:00 2001 From: lareii Date: Fri, 6 Sep 2024 00:55:28 +0300 Subject: [PATCH] feat(client): add markdown support for post and comment components --- client/components/app/Comment/index.jsx | 5 +- client/components/app/Navbar/PostModal.jsx | 1 + client/components/app/Post/CommentButton.jsx | 1 + client/components/app/Post/index.jsx | 5 +- client/package-lock.json | 1322 +++++++++++++++++- client/package.json | 1 + client/styles/main.css | 31 +- 7 files changed, 1304 insertions(+), 62 deletions(-) diff --git a/client/components/app/Comment/index.jsx b/client/components/app/Comment/index.jsx index cb93fd4..afa0008 100644 --- a/client/components/app/Comment/index.jsx +++ b/client/components/app/Comment/index.jsx @@ -1,4 +1,5 @@ import { useState } from 'react'; +import Markdown from 'react-markdown' import UserHoverCard from '@/components/app/HoverCard'; import Dropdown from '@/components/app/Comment/Dropdown'; import LikeButton from '@/components/app/Comment/LikeButton'; @@ -18,9 +19,7 @@ export default function Comment({ comment: initialComment, onDelete }) { -
- {comment.content} -
+ {comment.content}
diff --git a/client/components/app/Navbar/PostModal.jsx b/client/components/app/Navbar/PostModal.jsx index bf157e6..c45a81b 100644 --- a/client/components/app/Navbar/PostModal.jsx +++ b/client/components/app/Navbar/PostModal.jsx @@ -94,6 +94,7 @@ export default function PostModal() { )} /> +
* markdown destekliyor