Skip to content

Commit

Permalink
bug fix for emoji issue narayan954#737
Browse files Browse the repository at this point in the history
  • Loading branch information
biplavmz committed Jul 28, 2023
1 parent b67f703 commit c91c3b0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/components/Post/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function Post(prop) {
const [comment, setComment] = useState("");
const [likesNo, setLikesNo] = useState(likecount ? likecount.length : 0);
const [showEmojis, setShowEmojis] = useState(false);
const [showCommentEmojis, setShowCommentEmojis] = useState(false);
const [isCommentOpen, setisCommentOpen] = useState(false);
const [deleteCommentID, setDeleteCommentID] = useState("");
const [openToDeleteComment, setOpenToDeleteComment] = useState(false);
Expand Down Expand Up @@ -110,6 +111,7 @@ function Post(prop) {
const onEmojiClick = (emojiObject, event) => {
setComment((prevInput) => prevInput + emojiObject.emoji);
setShowEmojis(false);
setShowCommentEmojis(false);
};

/**
Expand Down Expand Up @@ -264,6 +266,8 @@ function Post(prop) {
</DialogTitle>
<hr />
<ErrorBoundary>
<div style={{marginTop:`${comments.length < 3 ? "40%":"0px"}`}}>

<CommentDialogBox
Item={Item}
postHasImages={postHasImages}
Expand All @@ -279,11 +283,13 @@ function Post(prop) {
deleteComment={deleteComment}
deleteCommentID={deleteCommentID}
/>
</div>

</ErrorBoundary>
<ErrorBoundary>
<CommentBox
setShowEmojis={setShowEmojis}
showEmojis={showEmojis}
setShowEmojis={setShowCommentEmojis}
showEmojis={showCommentEmojis}
onEmojiClick={onEmojiClick}
comment={comment}
setComment={setComment}
Expand Down
2 changes: 1 addition & 1 deletion src/reusableComponents/DialogBox/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const DialogBox = ({
)}

<DialogContent
sx={{ color: "var(--color)", backgroundColor: "var(--dark-post-bg)" }}
sx={{ color: "var(--color)", backgroundColor: "var(--dark-post-bg)",minHeight:"300px" }}
>
<div>{children}</div>
</DialogContent>
Expand Down

0 comments on commit c91c3b0

Please sign in to comment.