Skip to content

Commit

Permalink
remove changes from MoneyRequestConfirmationList.
Browse files Browse the repository at this point in the history
Signed-off-by: Krishna Gupta <[email protected]>
  • Loading branch information
Krishna2323 committed May 14, 2024
1 parent bbcea3c commit eb01458
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/components/MoneyRequestConfirmationList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ function MoneyRequestConfirmationList({
const [didConfirmSplit, setDidConfirmSplit] = useState(false);

const [isAttachmentInvalid, setIsAttachmentInvalid] = useState(false);
const [invalidAttachmentPromt, setInvalidAttachmentPromt] = useState(translate('attachmentPicker.protectedPDFNotSupported'));

const navigateBack = () => {
Navigation.goBack(ROUTES.MONEY_REQUEST_CREATE_TAB_SCAN.getRoute(CONST.IOU.ACTION.CREATE, iouType, transactionID, reportID));
Expand Down Expand Up @@ -1051,14 +1050,7 @@ function MoneyRequestConfirmationList({
previewSourceURL={resolvedReceiptImage as string}
// We don't support scaning password protected PDF receipt
enabled={!isAttachmentInvalid}
onPassword={() => {
setIsAttachmentInvalid(true);
setInvalidAttachmentPromt(translate('attachmentPicker.protectedPDFNotSupported'));
}}
onLoadError={() => {
setInvalidAttachmentPromt(translate('attachmentPicker.errorWhileSelectingCorruptedAttachment'));
setIsAttachmentInvalid(true);
}}
onPassword={() => setIsAttachmentInvalid(true)}
/>
) : (
<ReceiptImage
Expand Down Expand Up @@ -1087,7 +1079,6 @@ function MoneyRequestConfirmationList({
receiptThumbnail,
fileExtension,
isDistanceRequest,
translate,
],
);

Expand Down Expand Up @@ -1160,11 +1151,11 @@ function MoneyRequestConfirmationList({
)}
{shouldShowAllFields && supplementaryFields}
<ConfirmModal
title={translate('attachmentPicker.attachmentError')}
title={translate('attachmentPicker.wrongFileType')}
onConfirm={navigateBack}
onCancel={navigateBack}
isVisible={isAttachmentInvalid}
prompt={invalidAttachmentPromt}
prompt={translate('attachmentPicker.protectedPDFNotSupported')}
confirmText={translate('common.close')}
shouldShowCancelButton={false}
/>
Expand Down

0 comments on commit eb01458

Please sign in to comment.