diff --git a/src/components/editor_panel.jsx b/src/components/editor_panel.jsx index 359eb83..e091f0d 100644 --- a/src/components/editor_panel.jsx +++ b/src/components/editor_panel.jsx @@ -10,6 +10,7 @@ import AreaOverview from "./area_overview"; import { Tab } from "../data/data"; import { TabContext } from "../pages/editor"; import NotesOverview from "./notes_overview"; +import Issues from "./issues"; const myTheme = createTheme({ dark: "light", @@ -27,7 +28,7 @@ const myTheme = createTheme({ const EditorPanel = (props) => { // const map = useRef(new Map()); - const {tab, setTab} = useContext(TabContext); + const { tab, setTab } = useContext(TabContext); const tabList = [ { tab: "Tables", itemKey: Tab.tables }, @@ -42,7 +43,7 @@ const EditorPanel = (props) => { setSelectedTable={props.setSelectedTable} />, , - , + , { props.setCode(e); }} />, - + , ]; return ( - - { - setTab(key); - }} - collapsible - > - {contentList[parseInt(tab) - 1]} - - - { - const blob = new Blob([props.code], { - type: "text/plain;charset=utf-8", - }); - window.saveAs(blob, "src.txt"); - }} - > - export src - - - { - // try { - // const parser = new Parser(); - // const ast = parser.astify(props.code); - // console.log(ast); - // ast.forEach((e) => { - // e.table.forEach((t) => { - // if (map.current.has(t.table)) { - // return; - // } - // map.current.set(t.table, t); - // const newTable = { - // id: props.tables.length, - // name: `table_${props.tables.length}`, - // x: 0, - // y: 0, - // fields: [ - // { - // name: "id", - // type: "UUID", - // default: "", - // check: "", - // primary: true, - // unique: true, - // notNull: true, - // increment: true, - // comment: "", - // }, - // ], - // comment: "", - // indices: [], - // color: defaultTableTheme, - // }; - // props.setTables((prev) => [...prev, newTable]); - // }); - // }); - // } catch (e) { - // alert("parsing error"); - // } - }} - > - parse - + + + + { + setTab(key); + }} + collapsible + > + {contentList[parseInt(tab) - 1]} + + + + + + + + + hi + + + ; +}