Browse Source

fix import

AykutSarac 3 years ago
parent
commit
16217646f7
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/utils/json-editor-parser.js

+ 6 - 2
src/utils/json-editor-parser.js

@@ -1,6 +1,8 @@
+import { FlowElement } from "react-flow-renderer";
+
 /**
- * @param {never[] | Object} input 
- * @returns {import("react-flow-renderer").FlowElement[]}
+ * @param {never[] | Object} input
+ * @returns {FlowElement[]}
  */
 export const parser = (input) => {
   try {
@@ -54,6 +56,8 @@ export const parser = (input) => {
 
     const res = extract(input);
 
+    console.log([...flatten(res), ...relationships(res)]);
+
     return [...flatten(res), ...relationships(res)];
   } catch (error) {
     console.error("An error occured while parsin JSON data!", error.stack);