From 321024fd4caba69f5098b1a37873c05ae06b00fb Mon Sep 17 00:00:00 2001 From: Cristhian Zanforlin Lousa Date: Fri, 15 Sep 2023 14:02:21 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20refactor(keypairListComponent):?= =?UTF-8?q?=20remove=20commented=20out=20code=20and=20unused=20imports=20f?= =?UTF-8?q?or=20cleaner=20code=20=F0=9F=90=9B=20fix(reactflowUtils.ts):=20?= =?UTF-8?q?add=20space=20before=20key=20in=20flattenedObject=20to=20preven?= =?UTF-8?q?t=20ordering=20when=20adding=20new=20keys=20to=20the=20object?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/keypairListComponent/index.tsx | 38 +------------------ src/frontend/src/utils/reactflowUtils.ts | 2 +- 2 files changed, 2 insertions(+), 38 deletions(-) diff --git a/src/frontend/src/components/keypairListComponent/index.tsx b/src/frontend/src/components/keypairListComponent/index.tsx index d555b1ead..f33c3aa2b 100644 --- a/src/frontend/src/components/keypairListComponent/index.tsx +++ b/src/frontend/src/components/keypairListComponent/index.tsx @@ -19,42 +19,6 @@ export default function KeypairListComponent({ } }, [disabled]); - //when this feature is available, this code below must be in the parent component - // const [errorDuplicateKey, setErrorDuplicateKey] = useState(false); - // const [dict, setDict] = useState({ - // key1: "value1", - // key2: "value2", - // key3: "value3", - // key4: "value4", - // key5: "value5", - // key6: "value6", - // } as {}); - // const [dictArr, setDictArr] = useState([] as string[]); - - // useEffect(() => { - // setDictArr(convertObjToArray(dict)); - // }, [dict]); - - // left === true && type === "keypairlist" ? ( - //
- // { - // setErrorDuplicateKey(hasDuplicateKeys(newValue)); - // if(hasDuplicateKeys(newValue)){ - // setDictArr(newValue); - // } - // else{ - // setDict(convertArrayToObj(newValue)); - // } - // }} - // /> - //
- // ) - const handleChangeKey = (event, idx) => { const newInputList = _.cloneDeep(value); const oldKey = Object.keys(newInputList[idx])[0]; @@ -83,7 +47,7 @@ export default function KeypairListComponent({