Skip to content

Commit

Permalink
Merge pull request Expensify#35214 from Krishna2323/krishna2323/issue…
Browse files Browse the repository at this point in the history
…/34835

fix: Expense - Title tooltip shows user email below workspace name.
  • Loading branch information
Beamanator authored Jan 31, 2024
2 parents 30ead56 + 30c2a90 commit 49fbaa0
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,14 @@ function BaseUserDetailsTooltip({accountID, fallbackUserDetails, icon, delegateA
}

let title = String(userDisplayName).trim() ? userDisplayName : '';
const subtitle = userLogin.trim() && LocalePhoneNumber.formatPhoneNumber(userLogin) !== userDisplayName ? Str.removeSMSDomain(userLogin) : '';
let subtitle = userLogin.trim() && LocalePhoneNumber.formatPhoneNumber(userLogin) !== userDisplayName ? Str.removeSMSDomain(userLogin) : '';
if (icon && (icon.type === CONST.ICON_TYPE_WORKSPACE || !title)) {
title = icon.name ?? '';

// We need to clear the subtitle for workspaces so that we don't display any user details under the workspace name
if (icon.type === CONST.ICON_TYPE_WORKSPACE) {
subtitle = '';
}
}
const renderTooltipContent = useCallback(
() => (
Expand Down

0 comments on commit 49fbaa0

Please sign in to comment.