🛠️ 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 { 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);