feat: redesign doctor sharing poster layout and enhance download functionality with dynamic file naming

This commit is contained in:
hamed
2026-07-04 22:25:49 +03:30
parent 199c843b08
commit 3c019932bd
9 changed files with 443 additions and 138 deletions
+2 -1
View File
@@ -63,7 +63,8 @@ function List({ hiddenRef, data, qrReady }) {
});
pdf.addImage(imgData, "PNG", 0, 0, imgWidth, imgHeight);
pdf.save("poster.pdf");
const safeName = (data?.name ?? "doctor").replace(/[\\/:*?"<>|]+/g, "-");
pdf.save(`poster-${safeName}.pdf`);
} catch {
toast.error("ساخت پوستر ناموفق بود، دوباره تلاش کنید");
} finally {