diff --git a/src/components/MoneyRequestConfirmationList.js b/src/components/MoneyRequestConfirmationList.js index f8006788bbac..5365badce969 100755 --- a/src/components/MoneyRequestConfirmationList.js +++ b/src/components/MoneyRequestConfirmationList.js @@ -20,6 +20,7 @@ import MenuItemWithTopDescription from './MenuItemWithTopDescription'; import Navigation from '../libs/Navigation/Navigation'; import optionPropTypes from './optionPropTypes'; import * as CurrencyUtils from '../libs/CurrencyUtils'; +import * as ReportUtils from '../libs/ReportUtils'; const propTypes = { /** Callback to inform parent modal of success */ @@ -228,6 +229,17 @@ function MoneyRequestConfirmationList(props) { [props.session.email], ); + /** + * Navigate to profile of selected user + * @param {Object} option + */ + const navigateToUserDetail = (option) => { + if (!option.login) { + return; + } + Navigation.navigate(ROUTES.getProfileRoute(ReportUtils.getAccountIDForLogin(option.login))); + }; + /** * @param {String} paymentMethod */ @@ -290,12 +302,13 @@ function MoneyRequestConfirmationList(props) { 1; // We only create tooltips for the first 10 users or so since some reports have hundreds of users, causing performance to degrade. - const displayNamesWithTooltips = ReportUtils.getDisplayNamesWithTooltips((this.props.option.participantsList || []).slice(0, 10), isMultipleParticipant); + const displayNamesWithTooltips = ReportUtils.getDisplayNamesWithTooltips( + (this.props.option.participantsList || this.props.option.login ? [this.props.option] : []).slice(0, 10), + isMultipleParticipant, + ); let subscriptColor = themeColors.appBG; if (this.props.optionIsFocused) { subscriptColor = focusedBackgroundColor;