From 685169caa4d33d6ed69f1519db7375e7a2b50437 Mon Sep 17 00:00:00 2001 From: someone-here Date: Wed, 14 Jun 2023 17:48:18 +0530 Subject: [PATCH] Add tooltips and nav to bill details --- src/components/MoneyRequestConfirmationList.js | 14 +++++++++++++- src/components/OptionRow.js | 5 ++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/components/MoneyRequestConfirmationList.js b/src/components/MoneyRequestConfirmationList.js index f8006788bbac..45ffaa6d9a95 100755 --- a/src/components/MoneyRequestConfirmationList.js +++ b/src/components/MoneyRequestConfirmationList.js @@ -228,6 +228,17 @@ function MoneyRequestConfirmationList(props) { [props.session.email], ); + /** + * Navigate to details page of selected user + * @param {Object} option + */ + const navigateToUserDetail = (option) => { + if (!option.login) { + return; + } + Navigation.navigate(ROUTES.getDetailsRoute(option.login)); + }; + /** * @param {String} paymentMethod */ @@ -290,12 +301,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;