From d2ea259e96cf430831021525b02a9f1b2e482e62 Mon Sep 17 00:00:00 2001 From: cha0s Date: Sun, 20 Mar 2022 13:11:02 -0500 Subject: [PATCH] fix: warnings --- .../behavior-persea/src/controllers/script/component.jsx | 6 ++++-- packages/react/src/components/code/index.jsx | 7 ++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/behavior-persea/src/controllers/script/component.jsx b/packages/behavior-persea/src/controllers/script/component.jsx index cdf2820..c8c9a93 100644 --- a/packages/behavior-persea/src/controllers/script/component.jsx +++ b/packages/behavior-persea/src/controllers/script/component.jsx @@ -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, }; diff --git a/packages/react/src/components/code/index.jsx b/packages/react/src/components/code/index.jsx index 3dec33d..a5d75ec 100644 --- a/packages/react/src/components/code/index.jsx +++ b/packages/react/src/components/code/index.jsx @@ -18,15 +18,16 @@ const Code = ({ }) => ( onChange(event, value)} + setOptions={{useWorker: false}} tabSize={2} theme="monokai" - onChange={(value, event) => onChange(event, value)} value={code} + width="100%" /> );