mirror of
https://github.com/AykutSarac/jsoncrack.com.git
synced 2025-01-27 15:22:56 +08:00
update export
This commit is contained in:
parent
df77fa39d9
commit
ed466f7b46
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user