From 80ac20cd719e9cd78caf9d2ec505e50acfadce4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20S=C3=A1nchez?= Date: Mon, 8 Apr 2024 13:20:13 +0200 Subject: [PATCH 1/2] removed debug --- src/ui.tsx | 56 +----------------------------------------------------- 1 file changed, 1 insertion(+), 55 deletions(-) diff --git a/src/ui.tsx b/src/ui.tsx index d6e93cc..735a35a 100644 --- a/src/ui.tsx +++ b/src/ui.tsx @@ -20,19 +20,13 @@ type FigmaImageData = { }; type PenpotExporterState = { - isDebug: boolean; - penpotFileData: string; missingFonts: Set; - figmaFileData: string; figmaRootNode: NodeData | null; images: { [id: string]: FigmaImageData }; }; export default class PenpotExporter extends React.Component { state: PenpotExporterState = { - isDebug: false, - penpotFileData: '', - figmaFileData: '', missingFonts: new Set(), figmaRootNode: null, images: {} @@ -379,16 +373,7 @@ export default class PenpotExporter extends React.Component { - const file = this.createPenpotFile(); - const penpotFileMap = file.asMap(); - this.setState(() => ({ - penpotFileData: JSON.stringify( - penpotFileMap, - (key, value) => (value instanceof Map ? [...value] : value), - 4 - ) - })); - file.export(); + this.createPenpotFile().export(); }; onCancel = () => { @@ -399,11 +384,6 @@ export default class PenpotExporter extends React.Component { if (event.data.pluginMessage.type == 'FIGMAFILE') { this.setState(() => ({ - figmaFileData: JSON.stringify( - event.data.pluginMessage.data, - (key, value) => (value instanceof Map ? [...value] : value), - 4 - ), figmaRootNode: event.data.pluginMessage.data })); } else if (event.data.pluginMessage.type == 'IMAGE') { @@ -436,19 +416,9 @@ export default class PenpotExporter extends React.Component) => { - const isDebug = event.currentTarget.checked; - this.setState(() => ({ isDebug: isDebug })); - }; - renderFontWarnings = () => { return (
    @@ -476,31 +446,7 @@ export default class PenpotExporter extends React.ComponentEnsure fonts are installed in Penpot before importing.
    {this.renderFontWarnings()}
    -
    - - -
    -
    -
    -