Skip to content

Commit

Permalink
Show participant details page for valid members only
Browse files Browse the repository at this point in the history
  • Loading branch information
s77rt committed Jun 4, 2024
1 parent 0c56310 commit 2dd3769
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pages/ReportParticipantDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import type SCREENS from '@src/SCREENS';
import type {PersonalDetails, PersonalDetailsList} from '@src/types/onyx';
import NotFoundPage from './ErrorPage/NotFoundPage';
import withReportOrNotFound from './home/report/withReportOrNotFound';
import type {WithReportOrNotFoundProps} from './home/report/withReportOrNotFound';

Expand Down Expand Up @@ -69,6 +70,10 @@ function ReportParticipantDetails({personalDetails, report, route}: ReportPartic
Navigation.navigate(ROUTES.REPORT_PARTICIPANTS_ROLE_SELECTION.getRoute(report.reportID, accountID));
}, [accountID, report.reportID]);

if (!member) {
return <NotFoundPage />;
}

return (
<ScreenWrapper testID={ReportParticipantDetails.displayName}>
<HeaderWithBackButton
Expand Down

0 comments on commit 2dd3769

Please sign in to comment.