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 { FC, ReactNode } from "react";
|
||||||
|
import { observer } from "mobx-react";
|
||||||
import { MessageCircle } from "lucide-react";
|
import { MessageCircle } from "lucide-react";
|
||||||
// hooks
|
// hooks
|
||||||
import { calculateTimeAgo } from "@/helpers/date-time.helper";
|
import { calculateTimeAgo } from "@/helpers/date-time.helper";
|
||||||
@ -12,7 +13,7 @@ type TIssueCommentBlock = {
|
|||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const IssueCommentBlock: FC<TIssueCommentBlock> = (props) => {
|
export const IssueCommentBlock: FC<TIssueCommentBlock> = observer((props) => {
|
||||||
const { commentId, ends, quickActions, children } = props;
|
const { commentId, ends, quickActions, children } = props;
|
||||||
// hooks
|
// hooks
|
||||||
const {
|
const {
|
||||||
@ -63,4 +64,4 @@ export const IssueCommentBlock: FC<TIssueCommentBlock> = (props) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
});
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { FC, useEffect, useRef, useState } from "react";
|
import { FC, useEffect, useRef, useState } from "react";
|
||||||
|
import { observer } from "mobx-react";
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
import { Check, Globe2, Lock, Pencil, Trash2, X } from "lucide-react";
|
import { Check, Globe2, Lock, Pencil, Trash2, X } from "lucide-react";
|
||||||
import { EditorReadOnlyRefApi, EditorRefApi } from "@plane/lite-text-editor";
|
import { EditorReadOnlyRefApi, EditorRefApi } from "@plane/lite-text-editor";
|
||||||
@ -28,7 +29,7 @@ type TIssueCommentCard = {
|
|||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const IssueCommentCard: FC<TIssueCommentCard> = (props) => {
|
export const IssueCommentCard: FC<TIssueCommentCard> = observer((props) => {
|
||||||
const {
|
const {
|
||||||
workspaceSlug,
|
workspaceSlug,
|
||||||
projectId,
|
projectId,
|
||||||
@ -90,7 +91,7 @@ export const IssueCommentCard: FC<TIssueCommentCard> = (props) => {
|
|||||||
quickActions={
|
quickActions={
|
||||||
<>
|
<>
|
||||||
{!disabled && currentUser?.id === comment.actor && (
|
{!disabled && currentUser?.id === comment.actor && (
|
||||||
<CustomMenu ellipsis>
|
<CustomMenu ellipsis closeOnSelect>
|
||||||
<CustomMenu.MenuItem onClick={() => setIsEditing(true)} className="flex items-center gap-1">
|
<CustomMenu.MenuItem onClick={() => setIsEditing(true)} className="flex items-center gap-1">
|
||||||
<Pencil className="h-3 w-3" />
|
<Pencil className="h-3 w-3" />
|
||||||
Edit comment
|
Edit comment
|
||||||
@ -196,4 +197,4 @@ export const IssueCommentCard: FC<TIssueCommentCard> = (props) => {
|
|||||||
</>
|
</>
|
||||||
</IssueCommentBlock>
|
</IssueCommentBlock>
|
||||||
);
|
);
|
||||||
};
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user