diff --git a/src/components/operations/export-button.tsx b/src/components/operations/export-button.tsx index f2e90f0..3c85423 100644 --- a/src/components/operations/export-button.tsx +++ b/src/components/operations/export-button.tsx @@ -51,6 +51,7 @@ const ExportAction: React.FC = ({ text = "Export JSON", onEx icon={} label={text} onClick={onExportJson} + loading={loading} className={styles?.core?.button?.className} style={styles?.core?.button?.properties} /> diff --git a/src/components/operations/index.tsx b/src/components/operations/index.tsx index 7a210db..f660ba8 100644 --- a/src/components/operations/index.tsx +++ b/src/components/operations/index.tsx @@ -6,7 +6,6 @@ import { ids } from "@/constants"; import { store } from "@/store"; import { locationPlaceholder, setLocation, toggleControls } from "@/store/reducers/editor"; import { ISTKProps } from "@/types"; -import { stateToJSON } from "@/utils"; import { default as ExportAction } from "./export-button"; import { default as GridSwitch } from "./grid-switch"; @@ -29,17 +28,6 @@ const Operations: React.FC = ({ store.dispatch(setLocation(e.target.value)); }; - const onExportJson = () => { - const json = stateToJSON(); - if (events?.onExport) { - events?.onExport(json); - } else { - console.log(json); - sessionStorage.setItem("stk-data", JSON.stringify(json)); - navigator.clipboard.writeText(JSON.stringify(json)); - } - }; - return (
= ({ />
{showGridSwitch && } - +