From 39c4af0a7ccae2b34873e9ae197a201cb275cbac Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Wed, 11 Dec 2024 20:10:45 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(frontend)=20hide=20cursor=20for=20?= =?UTF-8?q?authenticated=20users?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a authenticated user was in read-only mode, the cursor was still visible. This commit hides the cursor for authenticated users in read-only mode. --- .../docs/doc-editor/components/BlockNoteEditor.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/frontend/apps/impress/src/features/docs/doc-editor/components/BlockNoteEditor.tsx b/src/frontend/apps/impress/src/features/docs/doc-editor/components/BlockNoteEditor.tsx index ebf96df6..868c5a6d 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-editor/components/BlockNoteEditor.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-editor/components/BlockNoteEditor.tsx @@ -81,10 +81,9 @@ export const BlockNoteEditor = ({ doc, provider }: BlockNoteEditorProps) => { const { uploadFile, errorAttachment } = useUploadFile(doc.id); - const collabName = - userData?.full_name || - userData?.email || - (readOnly ? 'Reader' : t('Anonymous')); + const collabName = readOnly + ? 'Reader' + : userData?.full_name || userData?.email || t('Anonymous'); const editor = useCreateBlockNote( {