From ed466f7b469e259b47c436416f4b60e49c7a7336 Mon Sep 17 00:00:00 2001 From: AykutSarac Date: Wed, 2 Feb 2022 18:48:44 +0300 Subject: [PATCH] update export --- src/pages/editor/JsonEditor/index.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/pages/editor/JsonEditor/index.tsx b/src/pages/editor/JsonEditor/index.tsx index c154d51..91de87b 100644 --- a/src/pages/editor/JsonEditor/index.tsx +++ b/src/pages/editor/JsonEditor/index.tsx @@ -35,7 +35,7 @@ export const defaultValue = [ }, ]; -const JsonEditor: React.FC = () => { +export const JsonEditor: React.FC = () => { const [json, setJson] = useLocalStorage("json", JSON.stringify(defaultValue)); React.useEffect(() => { @@ -55,7 +55,7 @@ const JsonEditor: React.FC = () => { JSON.parse(value.json); setJson(value.json); } catch (error) { - console.error("Invalid JSON!"); + console.error("Invalid JSON!", error.stack); } }} locale={locale} @@ -63,5 +63,3 @@ const JsonEditor: React.FC = () => { /> ); }; - -export default JsonEditor;