Skip to content

Commit c3a7105

Browse files
Antoni-CzaplickiRei-x
authored andcommitted
fix: fix schedule download on mobile
1 parent 5da7a8b commit c3a7105

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

frontend/src/app/plans/_components/download-button.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ export function DownloadPlanButton({
2525
setLoading(true);
2626
const element = captureRef.current;
2727
try {
28-
const dataUrl = await toPng(element, { cacheBust: true });
28+
const dataUrl = await toPng(element, {
29+
cacheBust: true,
30+
width: element.scrollWidth,
31+
height: element.scrollHeight,
32+
});
2933
const link = document.createElement("a");
3034
link.download = `${plan.name}.png`;
3135
link.href = dataUrl;

0 commit comments

Comments
 (0)