Skip to content

Commit

Permalink
Merge pull request #11344 from Expensify/neil-created-report-proptypes
Browse files Browse the repository at this point in the history
[No QA] Require report prop on ReportActionItemCreate and ReportWelcomeText
  • Loading branch information
neil-marcellini authored Sep 28, 2022
2 parents 35e4606 + b6c7d22 commit 1bed3e5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 7 additions & 2 deletions src/components/ReportWelcomeText.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ const personalDetailsPropTypes = PropTypes.shape({

const propTypes = {
/** The report currently being looked at */
report: PropTypes.oneOfType([PropTypes.object]),
report: PropTypes.shape({
/** The id of the report */
reportID: PropTypes.number,

/** The report owner's email */
ownerEmail: PropTypes.string,
}).isRequired,

/* Onyx Props */

Expand All @@ -45,7 +51,6 @@ const propTypes = {
};

const defaultProps = {
report: {},
policies: {},
};

Expand Down
6 changes: 4 additions & 2 deletions src/pages/home/report/ReportActionItemCreated.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import OfflineWithFeedback from '../../../components/OfflineWithFeedback';
import * as Report from '../../../libs/actions/Report';

const propTypes = {
/** The id of the report */
reportID: PropTypes.number.isRequired,

/** The report currently being looked at */
report: PropTypes.shape({
/** The id of the report */
Expand All @@ -23,7 +26,7 @@ const propTypes = {

/** Whether the user is not an admin of policyExpenseChat chat */
isOwnPolicyExpenseChat: PropTypes.bool,
}),
}).isRequired,

/** Personal details of all the users */
personalDetails: PropTypes.objectOf(participantPropTypes),
Expand All @@ -35,7 +38,6 @@ const propTypes = {
}),
};
const defaultProps = {
report: {},
personalDetails: {},
policies: {},
};
Expand Down

0 comments on commit 1bed3e5

Please sign in to comment.