fix: Download invoice pdf of the payment link page

This commit is contained in:
Ahmed Bouhuolia
2024-10-05 21:46:48 +02:00
parent 2649f1c326
commit c89b2367e6
3 changed files with 15 additions and 5 deletions

View File

@@ -33,7 +33,11 @@ export function PaymentPortal() {
const handleInvoiceDownloadBtnClick = () => {
generatePaymentLinkInvoice({ paymentLinkId: linkId })
.then((data) => {
downloadFile(data, `Invoice ${sharableLinkMeta?.invoiceNo}.pdf`);
downloadFile(
data,
`Invoice ${sharableLinkMeta?.invoiceNo}`,
'application/pdf',
);
})
.catch(() => {
AppToaster.show({