Yuki Takei 3 лет назад
Родитель
Сommit
e17f575f97

+ 1 - 3
packages/app/src/components/SavePageControls/GrantSelector.tsx

@@ -157,10 +157,8 @@ const GrantSelector = (props: Props): JSX.Element => {
       return <></>;
     }
 
-    const isLoading = myUserGroupRelations == null;
-
     // show spinner
-    if (isLoading) {
+    if (myUserGroupRelations == null) {
       return (
         <div className="my-3 text-center">
           <i className="fa fa-lg fa-spinner fa-pulse mx-auto text-muted"></i>

+ 4 - 1
packages/app/src/components/UncontrolledCodeMirror.tsx

@@ -1,6 +1,8 @@
 import React, { forwardRef, ReactNode, Ref } from 'react';
+
 import { ICodeMirror, UnControlled as CodeMirror } from 'react-codemirror2';
 import { Container, Subscribe } from 'unstated';
+
 import EditorContainer from '~/client/services/EditorContainer';
 import AbstractEditor, { AbstractEditorProps } from '~/components/PageEditor/AbstractEditor';
 
@@ -28,7 +30,8 @@ class UncontrolledCodeMirrorCore extends AbstractEditor<UncontrolledCodeMirrorCo
       value, isGfmMode, lineNumbers, editorContainer, options, forwardedRef, ...rest
     } = this.props;
 
-    const { editorOptions } = editorContainer.state;
+    // eslint-disable-next-line @typescript-eslint/no-explicit-any
+    const editorOptions = (editorContainer.state as any).editorOptions;
 
     return (
       <CodeMirror