mirror of
https://github.com/pheralb/svgl.git
synced 2025-02-06 06:58:04 +08:00
🛠️ Use the new `getSource
` utility on downloadSvg
This commit is contained in:
parent
313d293ba6
commit
1d6d61e2f1
@ -17,7 +17,7 @@
|
|||||||
import { buttonStyles } from '@/ui/styles';
|
import { buttonStyles } from '@/ui/styles';
|
||||||
|
|
||||||
import { cn } from '@/utils/cn';
|
import { cn } from '@/utils/cn';
|
||||||
import { getSvgContent } from '@/utils/getSvgContent';
|
import { getSource } from '@/templates/getSource';
|
||||||
|
|
||||||
// Props:
|
// Props:
|
||||||
interface DownloadSVGProps {
|
interface DownloadSVGProps {
|
||||||
@ -60,8 +60,12 @@
|
|||||||
}) => {
|
}) => {
|
||||||
const zip = new JSZip();
|
const zip = new JSZip();
|
||||||
|
|
||||||
const lightSvg = await getSvgContent(lightRoute);
|
const lightSvg = await getSource({
|
||||||
const darkSvg = await getSvgContent(darkRoute);
|
url: lightRoute
|
||||||
|
});
|
||||||
|
const darkSvg = await getSource({
|
||||||
|
url: darkRoute
|
||||||
|
});
|
||||||
|
|
||||||
if (isWordmark) {
|
if (isWordmark) {
|
||||||
zip.file(`${svgInfo.title}_wordmark_light.svg`, lightSvg);
|
zip.file(`${svgInfo.title}_wordmark_light.svg`, lightSvg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user