mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
[WEB-1361] fix: comments access specifier mutation issue. (#4515)
This commit is contained in:
parent
915ea8a81c
commit
fe4dea1474
@ -1,4 +1,5 @@
|
||||
import { FC, ReactNode } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { MessageCircle } from "lucide-react";
|
||||
// hooks
|
||||
import { calculateTimeAgo } from "@/helpers/date-time.helper";
|
||||
@ -12,7 +13,7 @@ type TIssueCommentBlock = {
|
||||
children: ReactNode;
|
||||
};
|
||||
|
||||
export const IssueCommentBlock: FC<TIssueCommentBlock> = (props) => {
|
||||
export const IssueCommentBlock: FC<TIssueCommentBlock> = observer((props) => {
|
||||
const { commentId, ends, quickActions, children } = props;
|
||||
// hooks
|
||||
const {
|
||||
@ -63,4 +64,4 @@ export const IssueCommentBlock: FC<TIssueCommentBlock> = (props) => {
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
});
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { FC, useEffect, useRef, useState } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { Check, Globe2, Lock, Pencil, Trash2, X } from "lucide-react";
|
||||
import { EditorReadOnlyRefApi, EditorRefApi } from "@plane/lite-text-editor";
|
||||
@ -28,7 +29,7 @@ type TIssueCommentCard = {
|
||||
disabled?: boolean;
|
||||
};
|
||||
|
||||
export const IssueCommentCard: FC<TIssueCommentCard> = (props) => {
|
||||
export const IssueCommentCard: FC<TIssueCommentCard> = observer((props) => {
|
||||
const {
|
||||
workspaceSlug,
|
||||
projectId,
|
||||
@ -90,7 +91,7 @@ export const IssueCommentCard: FC<TIssueCommentCard> = (props) => {
|
||||
quickActions={
|
||||
<>
|
||||
{!disabled && currentUser?.id === comment.actor && (
|
||||
<CustomMenu ellipsis>
|
||||
<CustomMenu ellipsis closeOnSelect>
|
||||
<CustomMenu.MenuItem onClick={() => setIsEditing(true)} className="flex items-center gap-1">
|
||||
<Pencil className="h-3 w-3" />
|
||||
Edit comment
|
||||
@ -196,4 +197,4 @@ export const IssueCommentCard: FC<TIssueCommentCard> = (props) => {
|
||||
</>
|
||||
</IssueCommentBlock>
|
||||
);
|
||||
};
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user