fix: use loadable MonacoEditor
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
3b8e257643
commit
3ea251383f
10
client/package-lock.json
generated
10
client/package-lock.json
generated
@@ -1740,6 +1740,16 @@
|
|||||||
"@types/yargs": "^13.0.0"
|
"@types/yargs": "^13.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@loadable/component": {
|
||||||
|
"version": "5.13.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@loadable/component/-/component-5.13.1.tgz",
|
||||||
|
"integrity": "sha512-qTNfTv5bVfb9eTKNUOMzPweRnxzNaxCmLZEsFEMn+kxpd86iXae+IpibXFJlnb052Q4fVkcWM2tvmWLc/+HzLg==",
|
||||||
|
"requires": {
|
||||||
|
"@babel/runtime": "^7.7.7",
|
||||||
|
"hoist-non-react-statics": "^3.3.1",
|
||||||
|
"react-is": "^16.12.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@mdx-js/mdx": {
|
"@mdx-js/mdx": {
|
||||||
"version": "1.6.1",
|
"version": "1.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-1.6.1.tgz",
|
"resolved": "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-1.6.1.tgz",
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
"@freecodecamp/loop-protect": "^2.2.1",
|
"@freecodecamp/loop-protect": "^2.2.1",
|
||||||
"@freecodecamp/react-bootstrap": "^0.32.3",
|
"@freecodecamp/react-bootstrap": "^0.32.3",
|
||||||
"@freecodecamp/react-calendar-heatmap": "^1.0.0",
|
"@freecodecamp/react-calendar-heatmap": "^1.0.0",
|
||||||
|
"@loadable/component": "^5.13.1",
|
||||||
"@reach/router": "^1.2.1",
|
"@reach/router": "^1.2.1",
|
||||||
"algoliasearch": "^3.35.1",
|
"algoliasearch": "^3.35.1",
|
||||||
"axios": "^0.19.0",
|
"axios": "^0.19.0",
|
||||||
|
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
|
|||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { createSelector } from 'reselect';
|
import { createSelector } from 'reselect';
|
||||||
import isEqual from 'lodash/isEqual';
|
import isEqual from 'lodash/isEqual';
|
||||||
|
import Loadable from '@loadable/component';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
canFocusEditorSelector,
|
canFocusEditorSelector,
|
||||||
@@ -20,7 +21,7 @@ import { toSortedArray } from '../../../../../utils/sort-files';
|
|||||||
|
|
||||||
import './editor.css';
|
import './editor.css';
|
||||||
|
|
||||||
const MonacoEditor = React.lazy(() => import('react-monaco-editor'));
|
const MonacoEditor = Loadable(() => import('react-monaco-editor'));
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
canFocus: PropTypes.bool,
|
canFocus: PropTypes.bool,
|
||||||
|
Reference in New Issue
Block a user