Skip to content

Commit

Permalink
Merge pull request #51594 from Expensify/youssef_free_trial_action_bu…
Browse files Browse the repository at this point in the history
…tton

Hide add payment card button once a card is added
  • Loading branch information
youssef-lr authored Nov 12, 2024
2 parents bb1d06b + 6a0ca29 commit 2bf7870
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/home/report/ReportActionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import * as ReportActionsUtils from '@libs/ReportActionsUtils';
import * as ReportUtils from '@libs/ReportUtils';
import SelectionScraper from '@libs/SelectionScraper';
import shouldRenderAddPaymentCard from '@libs/shouldRenderAppPaymentCard';
import {doesUserHavePaymentCardAdded} from '@libs/SubscriptionUtils';
import {ReactionListContext} from '@pages/home/ReportScreenContext';
import * as BankAccounts from '@userActions/BankAccounts';
import * as EmojiPickerAction from '@userActions/EmojiPickerAction';
Expand Down Expand Up @@ -397,7 +398,7 @@ function ReportActionItem({
const mentionReportContextValue = useMemo(() => ({currentReportID: report?.reportID ?? '-1'}), [report?.reportID]);

const actionableItemButtons: ActionableItem[] = useMemo(() => {
if (ReportActionsUtils.isActionableAddPaymentCard(action) && shouldRenderAddPaymentCard()) {
if (ReportActionsUtils.isActionableAddPaymentCard(action) && !doesUserHavePaymentCardAdded() && shouldRenderAddPaymentCard()) {
return [
{
text: 'subscription.cardSection.addCardButton',
Expand Down

0 comments on commit 2bf7870

Please sign in to comment.