From feb6088229b4c9aec8924798d2a6ca347562fcd4 Mon Sep 17 00:00:00 2001 From: Max Voloshinskii Date: Wed, 17 Apr 2024 20:52:52 +0300 Subject: [PATCH] fix(mobile): Render SlideButton conditionally --- .../NFTOperations/Modals/SignRawModal.tsx | 1 + .../NFTOperations/NFTOperationFooter.tsx | 35 +++++++++++++++---- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/packages/mobile/src/core/ModalContainer/NFTOperations/Modals/SignRawModal.tsx b/packages/mobile/src/core/ModalContainer/NFTOperations/Modals/SignRawModal.tsx index 7623175b7..885a1d4ed 100644 --- a/packages/mobile/src/core/ModalContainer/NFTOperations/Modals/SignRawModal.tsx +++ b/packages/mobile/src/core/ModalContainer/NFTOperations/Modals/SignRawModal.tsx @@ -312,6 +312,7 @@ export const SignRawModal = memo((props) => { void; disabled?: boolean; redirectToActivity?: boolean; + withSlider?: boolean; } export const ActionFooter = React.forwardRef( @@ -200,13 +201,33 @@ export const ActionFooter = React.forwardRef isVisible={state === States.INITIAL} entranceAnimation={false} > - - props.onPressConfirm()} - text={t('nft_operation_slide_to_confirm')} - /> - + {props.withSlider ? ( + + props.onPressConfirm()} + text={t('nft_operation_slide_to_confirm')} + /> + + ) : ( + + {withCloseButton ? ( + <> + closeModal(false)}> + {t('cancel')} + + + + ) : null} + props.onPressConfirm()} + mode={props.secondary ? 'secondary' : 'primary'} + > + {props.confirmTitle ?? t('nft_confirm_operation')} + + + )}