mirror of
https://github.com/pheralb/svgl.git
synced 2024-11-10 14:46:54 +08:00
⚙️ Delete unused function
This commit is contained in:
parent
37486f48e4
commit
c622b769f7
@ -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)}>
|
||||
|
Loading…
Reference in New Issue
Block a user