Skip to content

Commit 57edd7f

Browse files
committed
block-comment-button-if-comment
1 parent 0e63521 commit 57edd7f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/frontend/apps/impress/src/features/docs/doc-editor/components/BlockNoteEditor.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import {
2929
import { useEditorStore } from '../stores';
3030
import { cssEditor } from '../styles';
3131
import { DocsBlockNoteEditor } from '../types';
32-
import { HARDCODED_USERS } from '../userdata';
3332
import { randomColor } from '../utils';
3433

3534
import { BlockNoteSuggestionMenu } from './BlockNoteSuggestionMenu';

src/frontend/apps/impress/src/features/docs/doc-editor/components/comments/CommentToolbarButton.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ export const CommentToolbarButton = () => {
2323
DocsStyleSchema
2424
>();
2525

26-
if (!editor.isEditable || !Components || !currentDoc?.abilities.comment) {
26+
if (
27+
!editor.isEditable ||
28+
!Components ||
29+
!currentDoc?.abilities.comment /* ||
30+
editor._tiptapEditor.isActive('comment') // has already a comment*/
31+
) {
2732
return null;
2833
}
2934

0 commit comments

Comments
 (0)