diff --git a/src/containers/JsonEditor/index.tsx b/src/containers/JsonEditor/index.tsx index cb08ec0..573f3c3 100644 --- a/src/containers/JsonEditor/index.tsx +++ b/src/containers/JsonEditor/index.tsx @@ -58,14 +58,6 @@ const JsonEditor: React.FC = () => { }; }, [json]); - React.useEffect(() => { - if (settings.autoformat) { - return setValue(JSON.stringify(JSON.parse(json), null, 2)); - } - - setValue(json); - }, [settings.autoformat, json]); - React.useEffect(() => { const formatTimer = setTimeout(() => { try { @@ -86,7 +78,7 @@ const JsonEditor: React.FC = () => { }, 1800); return () => clearTimeout(formatTimer); - }, [value, settings.autoformat, dispatch]); + }, [value, settings.autoformat, dispatch, json]); return (