fix: warnings
This commit is contained in:
parent
dbf30b8af1
commit
d2ea259e96
|
@ -23,12 +23,14 @@ const ScriptComponent = ({
|
|||
);
|
||||
};
|
||||
|
||||
ScriptComponent.defaultProps = {};
|
||||
ScriptComponent.defaultProps = {
|
||||
path: '/',
|
||||
};
|
||||
|
||||
ScriptComponent.displayName = 'ScriptComponent';
|
||||
|
||||
ScriptComponent.propTypes = {
|
||||
path: PropTypes.string.isRequired,
|
||||
path: PropTypes.string,
|
||||
resource: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
|
|
|
@ -18,15 +18,16 @@ const Code = ({
|
|||
}) => (
|
||||
<AceEditor
|
||||
className={className}
|
||||
name={name.replace(/[^a-zA-Z0-9]/g, '-')}
|
||||
fontSize={fontSize}
|
||||
height={height || `${code.split('\n').length}em`}
|
||||
width="100%"
|
||||
mode="javascript"
|
||||
name={name.replace(/[^a-zA-Z0-9]/g, '-')}
|
||||
onChange={(value, event) => onChange(event, value)}
|
||||
setOptions={{useWorker: false}}
|
||||
tabSize={2}
|
||||
theme="monokai"
|
||||
onChange={(value, event) => onChange(event, value)}
|
||||
value={code}
|
||||
width="100%"
|
||||
/>
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user