feat: redesign doctor sharing poster layout and enhance download functionality with dynamic file naming
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user