fix download link
Some checks failed
Deploy Amap / deploy (push) Failing after 22s

This commit is contained in:
2026-10-14 22:21:42 +02:00
parent 1a67617b3f
commit 1484a114e0
2 changed files with 3 additions and 6 deletions

View File

@@ -343,8 +343,8 @@ export function Contract() {
<ContractRecap <ContractRecap
opened={isRecapModalOpened} opened={isRecapModalOpened}
close={closeRecapModal} close={closeRecapModal}
pdfUrl={pdfUrl}
contractName={`${form.name}-${form.season}`} contractName={`${form.name}-${form.season}`}
pdfUrl={pdfUrl}
/> />
<Space h="15vh"></Space> <Space h="15vh"></Space>
<Overlay <Overlay

View File

@@ -35,10 +35,7 @@ export function ContractRecap({ opened, close, contractName, pdfUrl }: ContractR
return ( return (
<Modal <Modal
opened={opened} opened={opened}
onClose={() => { onClose={close}
URL.revokeObjectURL(pdfUrl);
close();
}}
size={"55rem"} size={"55rem"}
title={t("contract recap", { capfirst: true })} title={t("contract recap", { capfirst: true })}
> >
@@ -52,7 +49,7 @@ export function ContractRecap({ opened, close, contractName, pdfUrl }: ContractR
onSubmit={form.onSubmit(() => { onSubmit={form.onSubmit(() => {
const link = document.createElement("a"); const link = document.createElement("a");
link.href = pdfUrl; link.href = pdfUrl;
link.download = contractName || "contract"; link.download = contractName;
link.click(); link.click();
})} })}
> >