-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DRY iou prop types and default props #25961
Changes from 1 commit
24d136c
4d019dc
57cd981
86dba56
081a80c
bd840bd
4cbb254
a9a404e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import PropTypes from 'prop-types'; | ||
import CONST from '../../../CONST'; | ||
import participantPropTypes from '../../../components/participantPropTypes'; | ||
|
||
const iouPropTypes = PropTypes.shape({ | ||
/** ID (iouType + reportID) of the request */ | ||
id: PropTypes.string, | ||
|
||
/** Amount of the request */ | ||
amount: PropTypes.number, | ||
|
||
/** Currency of the request */ | ||
currency: PropTypes.string, | ||
|
||
/** Description of the request */ | ||
comment: PropTypes.string, | ||
|
||
merchant: PropTypes.string, | ||
created: PropTypes.string, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this one is "Date that the request was created" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. Any idea for the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can probably use the same description as
In the context of "manual request", the merchant doesn't really make much sense. It looks like we provide a "merchant" field, but never a description or directions on how to use it (from a consumer perspective). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I still don't understand what is merchant for haha. Updated the comment. |
||
receiptPath: PropTypes.string, | ||
bernhardoj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/** List of the participants */ | ||
participants: PropTypes.arrayOf(participantPropTypes), | ||
}); | ||
|
||
const iouDefaultProps = { | ||
id: '', | ||
amount: 0, | ||
currency: CONST.CURRENCY.USD, | ||
comment: '', | ||
merchant: '', | ||
created: '', | ||
participants: [], | ||
receiptPath: '', | ||
}; | ||
|
||
export {iouPropTypes, iouDefaultProps}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran the lint locally and found that iou prop is not exist here