Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

fix: highlight current user on read only lite text editor (#5472)

Aaryan Khandelwal03c28a11e85b
diff --git a/web/core/components/editor/lite-text-editor/lite-text-read-only-editor.tsx b/web/core/components/editor/lite-text-editor/lite-text-read-only-editor.tsx
index 5e8dfbd7a2..7f5512e990 100644
--- a/web/core/components/editor/lite-text-editor/lite-text-read-only-editor.tsx
+++ b/web/core/components/editor/lite-text-editor/lite-text-read-only-editor.tsx
@@ -4,13 +4,17 @@ import { EditorReadOnlyRefApi, ILiteTextReadOnlyEditor, LiteTextReadOnlyEditorWi
// helpers
import { cn } from "@/helpers/common.helper";
// hooks
-import { useMention } from "@/hooks/store";
+import { useMention, useUser } from "@/hooks/store";
interface LiteTextReadOnlyEditorWrapperProps extends Omit<ILiteTextReadOnlyEditor, "mentionHandler"> {}
export const LiteTextReadOnlyEditor = React.forwardRef<EditorReadOnlyRefApi, LiteTextReadOnlyEditorWrapperProps>(
({ ...props }, ref) => {
- const { mentionHighlights } = useMention({});
+ // store hooks
+ const { data: currentUser } = useUser();
+ const { mentionHighlights } = useMention({
+ user: currentUser,
+ });
return (
<LiteTextReadOnlyEditorWithRef