diff --git a/monkey/monkey_island/cc/ui/src/components/configuration-components/InternalConfig.js b/monkey/monkey_island/cc/ui/src/components/configuration-components/InternalConfig.js index feedd533f..abb0230a2 100644 --- a/monkey/monkey_island/cc/ui/src/components/configuration-components/InternalConfig.js +++ b/monkey/monkey_island/cc/ui/src/components/configuration-components/InternalConfig.js @@ -17,7 +17,7 @@ export default function InternalConfig(props) { } = props; const [selectedSection, setSelectedSection] = useState(initialSection); const [displayedSchema, setDisplayedSchema] = useState(getSchemaByKey(schema, initialSection)); - const [displayedSchemaUi, setDisplayedSchemaUi] = useState(uiSchema[initialSection]) + const [displayedSchemaUi, setDisplayedSchemaUi] = useState(uiSchema[initialSection]); const onInnerDataChange = (innerData) => { formData[selectedSection] = innerData.formData; @@ -27,7 +27,7 @@ export default function InternalConfig(props) { const setSection = (sectionKey) => { setSelectedSection(sectionKey); setDisplayedSchema(getSchemaByKey(schema, sectionKey)); - setDisplayedSchemaUi(uiSchema[sectionKey]) + setDisplayedSchemaUi(uiSchema[sectionKey]); } const renderNav = () => { @@ -57,11 +57,11 @@ export default function InternalConfig(props) { ) -}; +} function getSchemaByKey(schema, key) { - let definitions = schema['definitions'] - return {definitions: definitions, properties: schema['properties'][key]['properties']} + let definitions = schema['definitions']; + return {definitions: definitions, properties: schema['properties'][key]['properties']}; } function getNavTitle(schema, key) {