⚙️ Delete unused function

This commit is contained in:
pheralb 2024-04-09 23:52:32 +01:00
parent 37486f48e4
commit c622b769f7

View File

@ -122,7 +122,7 @@
body: JSON.stringify({ code: content, typescript: tsx, name: title })
});
const data = await getCode.json();
await copyReactContent(data);
await navigator.clipboard.writeText(data);
toast.success(`Copied as React ${tsx ? 'TSX' : 'JSX'} component`, {
description: `${svgInfo.title} - ${svgInfo.category}`
});
@ -135,18 +135,6 @@
isLoading = false;
}
};
// Copy React content:
const copyReactContent = async (content: string) => {
try {
const clipboardItem = new ClipboardItem({
'text/plain': new Blob([content], { type: 'text/plain' })
});
await navigator.clipboard.write([clipboardItem]);
} catch (error) {
await navigator.clipboard.writeText(content);
}
};
</script>
<Popover.Root open={optionsOpen} onOpenChange={(isOpen) => (optionsOpen = isOpen)}>