diff --git a/public/src/components/EditorWrapper/EditorWrapper.tsx b/public/src/components/EditorWrapper/EditorWrapper.tsx index aafe6487..9b372798 100644 --- a/public/src/components/EditorWrapper/EditorWrapper.tsx +++ b/public/src/components/EditorWrapper/EditorWrapper.tsx @@ -61,7 +61,7 @@ export class EditorWrapper extends Component { updateState = (store:NoteStoreState) => { this.syncTitle(store.note.title) - if (!this.props.isOwner && this.props.note?.public) { + if (!this.props.isOwner && this.props.note?.public && !this.props.isEditable) { this.self.innerHTML = "" new Viewer( store.note.blocks, diff --git a/public/src/components/SharePanel/SharePanel.tsx b/public/src/components/SharePanel/SharePanel.tsx index a13aca3e..7d9906f6 100644 --- a/public/src/components/SharePanel/SharePanel.tsx +++ b/public/src/components/SharePanel/SharePanel.tsx @@ -1,5 +1,4 @@ import {ScReact} from "@veglem/screact"; -import {Button} from "../Button/Button"; import "./SharePanel.sass" import {ToggleButton} from "../ToggleButton/ToggleButton"; import {Img} from "../Image/Image"; diff --git a/public/src/modules/stores/NotesStore.ts b/public/src/modules/stores/NotesStore.ts index d37db370..80f20fab 100644 --- a/public/src/modules/stores/NotesStore.ts +++ b/public/src/modules/stores/NotesStore.ts @@ -120,6 +120,8 @@ class NotesStore extends BaseStore { AppNotesStore.ClearCallbacks() AppNoteStore.ClearCallbacks() + this.invitesWS?.close(); + this.SetState(state => ({ ...state, notes: [],