🔨 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:
parent
dc2ff9a91c
commit
81bd366654
2 changed files with 4 additions and 7 deletions
|
|
@ -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(() => {
|
||||
|
|
|
|||
|
|
@ -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[]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue