This commit is contained in:
@@ -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();
|
||||
})}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user