✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.
remove repair json
AykutSarac13da53232517
diff --git a/src/store/useJson.tsx b/src/store/useJson.tsxindex c5516d1e..2f89f3ba 100644--- a/src/store/useJson.tsx+++ b/src/store/useJson.tsx@@ -5,14 +5,11 @@ import { defaultJson } from "src/constants/data";import { saveJson as saveJsonDB } from "src/services/db/json";import useGraph from "src/store/useGraph";import { Json } from "src/typings/altogic";-import { fixJSON } from "src/utils/repairJson";import { create } from "zustand";-import useUser from "./useUser";interface JsonActions {setJson: (json: string) => void;getJson: () => string;- repairJSON: (jsonstring: string) => void;getHasChanges: () => boolean;fetchJson: (jsonId: string | string[] | undefined) => void;setError: (hasError: boolean) => void;@@ -42,14 +39,6 @@ const useJson = create<JsonStates & JsonActions>()((set, get) => ({...initialStates,getJson: () => get().json,getHasChanges: () => get().hasChanges,- repairJSON: jsonstring => {- useUser.getState().validatePremium(() => {- const parsed = fixJSON(jsonstring);- console.log(parsed);-- get().setJson(parsed);- });- },fetchJson: async jsonId => {const isURL = new RegExp(/^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)$/