🔨 refactor(parameterComponent): update initial state of dict to include a default key-value pair for better clarity and consistency

🔨 refactor(EditNodeModal): update initial state of dict to include a default key-value pair for better clarity and consistency
This commit is contained in:
Cristhian Zanforlin Lousa 2023-09-14 14:39:07 -03:00
commit 81bd366654
2 changed files with 4 additions and 7 deletions

View file

@ -115,7 +115,9 @@ export default function ParameterComponent({
});
const [errorDuplicateKey, setErrorDuplicateKey] = useState(false);
const [dict, setDict] = useState({} as {});
const [dict, setDict] = useState({
yourKey: "yourValue",
} as {});
const [dictArr, setDictArr] = useState([] as string[]);
useEffect(() => {

View file

@ -101,12 +101,7 @@ const EditNodeModal = forwardRef(
const [errorDuplicateKey, setErrorDuplicateKey] = useState(false);
const [dict, setDict] = useState({
key1: "value1",
key2: "value2",
key3: "value3",
key4: "value4",
key5: "value5",
key6: "value6",
yourKey: "yourValue",
} as {});
const [dictArr, setDictArr] = useState([] as string[]);