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

This commit is contained in:
2026-10-14 22:04:56 +02:00
parent f1b924b4ba
commit 02086a3b71
2 changed files with 11 additions and 6 deletions

View File

@@ -8,9 +8,10 @@ export type ContractRecapProps = {
opened: boolean;
close: () => void;
pdfUrl?: string;
contractName?: string;
};
export function ContractRecap({ opened, close, pdfUrl }: ContractRecapProps) {
export function ContractRecap({ opened, close, pdfUrl, contractName }: ContractRecapProps) {
const [viewPdf, setViewPdf] = useState<boolean>(false);
const form = useForm({
mode: "uncontrolled",
@@ -51,7 +52,7 @@ export function ContractRecap({ opened, close, pdfUrl }: ContractRecapProps) {
onSubmit={form.onSubmit(() => {
const link = document.createElement("a");
link.href = pdfUrl;
link.target = "_blank";
link.download = contractName || "contract";
link.click();
})}
>