From f4acf8c31658d1155b0d825194c7c378ea5104e7 Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Tue, 30 May 2023 14:03:44 +0300 Subject: [PATCH] elements: fix linkDownloadKp --- .../Components/Calculation/config/elements-props.tsx | 2 +- packages/ui/elements/Link.tsx | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/apps/web/Components/Calculation/config/elements-props.tsx b/apps/web/Components/Calculation/config/elements-props.tsx index 9f50bf9..e22097d 100644 --- a/apps/web/Components/Calculation/config/elements-props.tsx +++ b/apps/web/Components/Calculation/config/elements-props.tsx @@ -504,7 +504,7 @@ const props: Partial = { width: '100%', }, }, - linkDownloadKp: { children: 'Скачать КП', icon: , target: '_blank' }, + linkDownloadKp: { children: 'Скачать КП', icon: }, tbxMileage: { min: 0, step: 100, diff --git a/packages/ui/elements/Link.tsx b/packages/ui/elements/Link.tsx index b1da20c..79474d5 100644 --- a/packages/ui/elements/Link.tsx +++ b/packages/ui/elements/Link.tsx @@ -1,17 +1,9 @@ import type { ButtonProps } from 'antd'; import { Button as AntButton } from 'antd'; -export function Link({ href, ...props }: ButtonProps) { +export function Link({ ...props }: ButtonProps) { return ( - { - window.open(href, '_blank')?.focus(); - }} - {...props} - > + {props.children} );