Skip to content

Commit

Permalink
create EditRequestReceiptPage
Browse files Browse the repository at this point in the history
  • Loading branch information
luacmartins committed Sep 5, 2023
1 parent 1c54e59 commit 84ef3bd
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/AttachmentModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ function AttachmentModal(props) {
const [confirmButtonFadeAnimation] = useState(new Animated.Value(1));
const [shouldShowDownloadButton, setShouldShowDownloadButton] = React.useState(true);
const {windowWidth} = useWindowDimensions();
const [isEditingReceipt, setIsEditingReceipt] = useState(false);

const [file, setFile] = useState(
props.originalFileName
Expand Down Expand Up @@ -361,8 +360,10 @@ function AttachmentModal(props) {
onSelected: () => {
closeModal();

// TODO: replace with actual edit receipt route
Navigation.navigate(ROUTES.getEditRequestRoute(props.report.reportID, 'amount'));
// TODO: remove timeout
setTimeout(() => {
Navigation.navigate(ROUTES.getEditRequestRoute(props.report.reportID, 'receipt'));
}, 1000)
},
},
{
Expand Down
27 changes: 27 additions & 0 deletions src/pages/EditRequestReceiptPage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react';
import ScreenWrapper from '../components/ScreenWrapper';
import HeaderWithBackButton from '../components/HeaderWithBackButton';
import Navigation from '../libs/Navigation/Navigation';
import useLocalize from '../hooks/useLocalize';
import ReceiptSelector from './iou/ReceiptSelector';

function EditRequestReceiptPage() {
const {translate} = useLocalize();

return (
<ScreenWrapper
includeSafeAreaPaddingBottom={false}
shouldEnableMaxHeight
>
<HeaderWithBackButton

This comment has been minimized.

Copy link
@mananjadhav

mananjadhav Oct 27, 2023

Collaborator

We added ScreenWrapper but not the safe area padding, which caused an issue here

title={translate('iou.amount')}
onBackButtonPress={Navigation.goBack}
/>
<ReceiptSelector />
</ScreenWrapper>
);
}

EditRequestReceiptPage.displayName = 'EditRequestReceiptPage';

export default EditRequestReceiptPage;

0 comments on commit 84ef3bd

Please sign in to comment.