Skip to content

Commit

Permalink
Merge pull request #21824 from dukenv0307/fix/21157
Browse files Browse the repository at this point in the history
Display not found page with invalid reportID in share code page
  • Loading branch information
arosiclair authored Jun 29, 2023
2 parents f9acca9 + af578e8 commit df91473
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/pages/home/report/ReportDetailsShareCodePage.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import React from 'react';
import PropTypes from 'prop-types';
import {withOnyx} from 'react-native-onyx';
import reportPropTypes from '../../reportPropTypes';
import ONYXKEYS from '../../../ONYXKEYS';
import ShareCodePage from '../../ShareCodePage';
import withReportOrNotFound from './withReportOrNotFound';

const propTypes = {
/** Navigation route context info provided by react navigation */
Expand All @@ -29,8 +28,4 @@ function ReportDetailsShareCodePage(props) {
ReportDetailsShareCodePage.propTypes = propTypes;
ReportDetailsShareCodePage.defaultProps = defaultProps;

export default withOnyx({
report: {
key: ({route}) => `${ONYXKEYS.COLLECTION.REPORT}${route.params.reportID}`,
},
})(ReportDetailsShareCodePage);
export default withReportOrNotFound(ReportDetailsShareCodePage);

0 comments on commit df91473

Please sign in to comment.