From 5bee548755d09a435f679f3aa28cf175b328909f Mon Sep 17 00:00:00 2001 From: abefernan <44572727+abefernan@users.noreply.github.com> Date: Thu, 13 Jul 2023 18:53:37 +0200 Subject: [PATCH] Remove "any" type. Use Mode type --- components/inputs/JsonEditor.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/inputs/JsonEditor.tsx b/components/inputs/JsonEditor.tsx index a171671..14b8b29 100644 --- a/components/inputs/JsonEditor.tsx +++ b/components/inputs/JsonEditor.tsx @@ -1,5 +1,5 @@ import { CSSProperties, useEffect, useRef } from "react"; -import { JSONEditorPropsOptional, JSONEditor as VanillaJsonEditor } from "vanilla-jsoneditor"; +import { JSONEditorPropsOptional, Mode, JSONEditor as VanillaJsonEditor } from "vanilla-jsoneditor"; const editorStyle: { [key: string]: string } & CSSProperties = { "--jse-a-color": "white", @@ -25,7 +25,7 @@ interface JsonEditorProps extends JSONEditorPropsOptional { export default function JsonEditor({ label, ...editorProps }: JsonEditorProps) { const refContainer = useRef(null); - const refEditor = useRef(null); + const refEditor = useRef(null); useEffect(() => { if (!refContainer.current) return; @@ -42,7 +42,7 @@ export default function JsonEditor({ label, ...editorProps }: JsonEditorProps) { useEffect(() => { if (refEditor.current) { - refEditor.current.updateProps({ mode: "text", mainMenuBar: false, ...editorProps }); + refEditor.current.updateProps({ mode: Mode.text, mainMenuBar: false, ...editorProps }); } }, [editorProps]);