diff --git a/src/components/Preview.svelte b/src/components/Preview.svelte index 1513912..a350180 100644 --- a/src/components/Preview.svelte +++ b/src/components/Preview.svelte @@ -21,13 +21,10 @@ // For SVG source code display let svgSource = ""; - let isFetchingSvgSource = false; - - // No event dispatching, parent is fully responsible for controlling the component function isSvgLogo(logo) { return logo && logo.format && logo.format.toLowerCase() === "svg"; - } // Function to copy SVG source from textarea + } function copySvgSourceFromTextarea() { if (svgSource) { try { @@ -35,7 +32,6 @@ return true; } catch (err) { console.error("Error copying from textarea:", err); - // Show content in prompt as fallback window.prompt("Copy the SVG source code:", svgSource); return false; } @@ -52,7 +48,6 @@ // Only fetch SVG source when displayed $: if (show && logo) { - // Fetch SVG source when logo is displayed and is an SVG if (logo.format === "SVG" && !svgSource) { isFetchingSvgSource = true; fetchSvgSource(logo.path) @@ -106,29 +101,23 @@
-