-
Notifications
You must be signed in to change notification settings - Fork 2.9k
/
EditRequestReceiptPage.js
53 lines (46 loc) · 1.67 KB
/
EditRequestReceiptPage.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import React from 'react';
import PropTypes from 'prop-types';
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';
import DragAndDropProvider from '../components/DragAndDrop/Provider';
const propTypes = {
/** React Navigation route */
route: PropTypes.shape({
/** Params from the route */
params: PropTypes.shape({
/** The type of IOU report, i.e. bill, request, send */
iouType: PropTypes.string,
/** The report ID of the IOU */
reportID: PropTypes.string,
}),
}).isRequired,
/** The id of the transaction we're editing */
transactionID: PropTypes.string.isRequired,
};
function EditRequestReceiptPage({route, transactionID}) {
const {translate} = useLocalize();
return (
<ScreenWrapper
includeSafeAreaPaddingBottom={false}
shouldEnableMaxHeight
testID="EditRequestReceiptPage"
>
<HeaderWithBackButton
title={translate('common.receipt')}
onBackButtonPress={Navigation.goBack}
/>
<DragAndDropProvider>
<ReceiptSelector
route={route}
transactionID={transactionID}
/>
</DragAndDropProvider>
</ScreenWrapper>
);
}
EditRequestReceiptPage.propTypes = propTypes;
EditRequestReceiptPage.displayName = 'EditRequestReceiptPage';
export default EditRequestReceiptPage;