Skip to content

Commit

Permalink
🐛(frontend) hide cursor for authenticated users
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AntoLC committed Dec 11, 2024
1 parent 57c5c39 commit 39c4af0
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
{
Expand Down

0 comments on commit 39c4af0

Please sign in to comment.