Commit b69d05e1 authored by tom's avatar tom

fix contract editor resize if there is only one source file

parent 7eba3e1c
...@@ -219,8 +219,9 @@ const CodeEditor = ({ data, remappings, libraries, language, mainFile }: Props) ...@@ -219,8 +219,9 @@ const CodeEditor = ({ data, remappings, libraries, language, mainFile }: Props)
}; };
return ( return (
<Box height={ `${ EDITOR_HEIGHT }px` } sx={ sx }> <Box height={ `${ EDITOR_HEIGHT }px` } width="100%" sx={ sx } ref={ containerNodeRef }>
<MonacoEditor <MonacoEditor
className="editor-container"
language={ editorLanguage } language={ editorLanguage }
path={ data[index].file_path } path={ data[index].file_path }
defaultValue={ data[index].source_code } defaultValue={ data[index].source_code }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment