From 3b95078b817f77aed1fb469201ade425c59e0b4b Mon Sep 17 00:00:00 2001 From: chris <kokosias@yahoo.gr> Date: Sun, 18 Jun 2023 23:24:45 +0300 Subject: [PATCH] return component --- .../components/EditorComponent.js | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/wax-prosemirror-services/src/FillTheGapQuestionService/components/EditorComponent.js b/wax-prosemirror-services/src/FillTheGapQuestionService/components/EditorComponent.js index f7b5e645b..6a9498a24 100644 --- a/wax-prosemirror-services/src/FillTheGapQuestionService/components/EditorComponent.js +++ b/wax-prosemirror-services/src/FillTheGapQuestionService/components/EditorComponent.js @@ -50,6 +50,9 @@ const EditorComponent = ({ node, view, getPos }) => { app, pmViews: { main }, } = context; + + const { testMode, showFeedBack } = main.props.customValues; + let gapView; const questionId = node.attrs.id; const isEditable = main.props.editable(editable => { @@ -156,15 +159,15 @@ const EditorComponent = ({ node, view, getPos }) => { }; return ( - <> - {isEditable || (!isEditable && !main.props.customValues.testMode) ? ( - <EditorWrapper> - <div ref={editorRef} /> - </EditorWrapper> - ) : ( - <InputComponent getPos={getPos} node={node} view={view} /> - )} - </> + isEditable || + (!isEditable && !testMode && !showFeedBack && ( + <EditorWrapper> + <div ref={editorRef} /> + </EditorWrapper> + )) || + (showFeedBack && !testMode && <span>hello</span>) || ( + <InputComponent getPos={getPos} node={node} view={view} /> + ) ); }; -- GitLab