🛠️ Use the new `getSource` utility on downloadSvg

This commit is contained in:
pheralb 2025-02-04 23:37:29 +00:00
parent 313d293ba6
commit 1d6d61e2f1

View File

@ -17,7 +17,7 @@
import { buttonStyles } from '@/ui/styles';
import { cn } from '@/utils/cn';
import { getSvgContent } from '@/utils/getSvgContent';
import { getSource } from '@/templates/getSource';
// Props:
interface DownloadSVGProps {
@ -60,8 +60,12 @@
}) => {
const zip = new JSZip();
const lightSvg = await getSvgContent(lightRoute);
const darkSvg = await getSvgContent(darkRoute);
const lightSvg = await getSource({
url: lightRoute
});
const darkSvg = await getSource({
url: darkRoute
});
if (isWordmark) {
zip.file(`${svgInfo.title}_wordmark_light.svg`, lightSvg);