From f1923c6a909b671e33d106df296cf7196348089e Mon Sep 17 00:00:00 2001 From: Ancor Gonzalez Sosa Date: Thu, 21 Nov 2024 21:59:28 +0000 Subject: [PATCH] Small changes in the code editor buttons --- web/src/components/core/ConfigEditor.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/src/components/core/ConfigEditor.tsx b/web/src/components/core/ConfigEditor.tsx index e3fd1096e..647ac3509 100644 --- a/web/src/components/core/ConfigEditor.tsx +++ b/web/src/components/core/ConfigEditor.tsx @@ -41,12 +41,15 @@ const ConfigEditor = ({ sections }): React.ReactNode => { }; const [configJson, setConfigJson] = useState(fetchConfigJson()); + const [isEnabled, setIsEnabled] = useState(false); const onChange = (code) => { setConfigJson(code); + setIsEnabled(true); }; const updateConfig = () => { + setIsEnabled(false); setConfig.mutate(JSON.parse(configJson)); }; @@ -60,9 +63,9 @@ const ConfigEditor = ({ sections }): React.ReactNode => { -