import React from "react"; import { useTheme } from "styled-components"; import { JSONTree } from "react-json-tree"; import useJson from "src/store/useJson"; import { EditModal } from "./EditModal"; import { Label } from "./Label"; import { Value } from "./Value"; export const TreeView = () => { const theme = useTheme(); const json = useJson(state => state.json); const [opened, setOpened] = React.useState(false); const [selectedValue, setSelectedValue] = React.useState(null); const [path, setPath] = React.useState<(string | number)[]>([]); const [value, setValue] = React.useState(""); const [errorMessage, setErrorMessage] = React.useState(null); return ( <> } labelRenderer={(keyPath, nodeType) => (