diff --git a/src/containers/my-cooperations/accept-cooperation-modal/AcceptCooperationModal.tsx b/src/containers/my-cooperations/accept-cooperation-modal/AcceptCooperationModal.tsx index 460cd295a..a01a82606 100644 --- a/src/containers/my-cooperations/accept-cooperation-modal/AcceptCooperationModal.tsx +++ b/src/containers/my-cooperations/accept-cooperation-modal/AcceptCooperationModal.tsx @@ -146,34 +146,30 @@ const AcceptCooperationModal: FC = ({ const onCooperationAccept = () => void handleAcceptCooperation() + const acceptButtonText = isDirty + ? 'cooperationsPage.acceptModal.resend' + : 'cooperationsPage.acceptModal.accept' + const acceptButtonType = isDirty + ? ButtonTypeEnum.Submit + : ButtonTypeEnum.Button + const buttons = loading || updateLoading ? ( ) : ( - <> + {needAction && ( - - {t('cooperationsPage.acceptModal.resend')} + + {t(acceptButtonText)} )} - - {needAction && ( - - {t('cooperationsPage.acceptModal.accept')} - - )} - void handleDeclineCooperation()} - variant={ButtonVariantEnum.Tonal} - > - {t('cooperationsPage.acceptModal.decline')} - - - + void handleDeclineCooperation()} + variant={ButtonVariantEnum.Tonal} + > + {t('cooperationsPage.acceptModal.decline')} + + ) return ( diff --git a/src/types/common/enums/common.enums.ts b/src/types/common/enums/common.enums.ts index 36b51bf17..690850a1f 100644 --- a/src/types/common/enums/common.enums.ts +++ b/src/types/common/enums/common.enums.ts @@ -60,7 +60,8 @@ export enum ButtonVariantEnum { } export enum ButtonTypeEnum { - Submit = 'submit' + Submit = 'submit', + Button = 'button' } export enum VisibilityEnum {