()
| 202 | }; |
| 203 | |
| 204 | const handleAddVariable = () => { |
| 205 | const key = newVarKey.trim(); |
| 206 | if (!key) return; |
| 207 | if (key in config || key in editedKeys) { |
| 208 | setMessage({ type: 'error', text: `Variable "${key}" already exists. Edit it above instead.` }); |
| 209 | return; |
| 210 | } |
| 211 | setEditedKeys((prev) => ({ ...prev, [key]: newVarValue })); |
| 212 | setAddedKeys((prev) => [...prev, key]); |
| 213 | setNewVarKey(''); |
| 214 | setNewVarValue(''); |
| 215 | // Make sure the Other section is expanded |
| 216 | setExpandedSections((prev) => ({ ...prev, Other: true })); |
| 217 | }; |
| 218 | |
| 219 | const toggleSection = (title) => { |
| 220 | setExpandedSections((prev) => ({ ...prev, [title]: !prev[title] })); |
nothing calls this directly
no outgoing calls
no test coverage detected