Skip to content

Commit

Permalink
Merge pull request #40409 from nkdengineer/fix/40257
Browse files Browse the repository at this point in the history
fix just display track expense of selfDM is loaded
  • Loading branch information
thienlnam authored Apr 19, 2024
2 parents cba5f03 + 0b61a9d commit 3a3db88
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ function FloatingActionButtonAndPopover(
showCreateMenu();
}
};
// eslint-disable-next-line react-hooks/exhaustive-deps
const selfDMReportID = useMemo(() => ReportUtils.findSelfDMReportID(), [isLoading]);

return (
<View style={styles.flexGrow1}>
Expand All @@ -285,7 +287,7 @@ function FloatingActionButtonAndPopover(
text: translate('sidebarScreen.fabNewChat'),
onSelected: () => interceptAnonymousUser(Report.startNewChat),
},
...(canUseTrackExpense
...(canUseTrackExpense && selfDMReportID
? [
{
icon: Expensicons.DocumentPlus,
Expand Down

0 comments on commit 3a3db88

Please sign in to comment.