Skip to content

Commit

Permalink
Merge pull request #33332 from Expensify/lucien/fix-tooltip-status-text
Browse files Browse the repository at this point in the history
Fix tooltip extra space when status text is empty
  • Loading branch information
deetergp authored Dec 27, 2023
2 parents 881a83b + 1eeba82 commit 6365aeb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/LHNOptionsList/OptionRowLHN.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function OptionRowLHN(props) {
const statusText = lodashGet(optionItem, 'status.text', '');
const statusClearAfterDate = lodashGet(optionItem, 'status.clearAfter', '');
const formattedDate = DateUtils.getStatusUntilDate(statusClearAfterDate);
const statusContent = formattedDate ? `${statusText} (${formattedDate})` : statusText;
const statusContent = formattedDate ? `${statusText ? `${statusText} ` : ''}(${formattedDate})` : statusText;
const isStatusVisible = !!emojiCode && ReportUtils.isOneOnOneChat(ReportUtils.getReport(optionItem.reportID));

const isGroupChat =
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/report/ReportActionItemSingle.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ function ReportActionItemSingle(props) {
const hasEmojiStatus = !displayAllActors && status && status.emojiCode;
const formattedDate = DateUtils.getStatusUntilDate(lodashGet(status, 'clearAfter'));
const statusText = lodashGet(status, 'text', '');
const statusTooltipText = formattedDate ? `${statusText} (${formattedDate})` : statusText;
const statusTooltipText = formattedDate ? `${statusText ? `${statusText} ` : ''}(${formattedDate})` : statusText;

return (
<View style={[styles.chatItem, props.wrapperStyle]}>
Expand Down

0 comments on commit 6365aeb

Please sign in to comment.