mirror of
https://github.com/makeplane/plane
synced 2025-08-07 19:59:33 +00:00
fix: highlight current user on read only lite text editor (#5472)
This commit is contained in:
committed by
GitHub
parent
bcd08b3159
commit
03c28a11e8
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user