Skip to content

Commit

Permalink
Hide add card button in memberships if web banking setting is off (#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
bloodyowl authored Dec 12, 2023
1 parent 4c374d2 commit 7a48264
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions clients/banking/src/components/AccountArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,7 @@ export const AccountArea = ({ accountMembershipId }: Props) => {
accountCountry={currentUserAccountMembership.account.country}
params={params}
currentUserAccountMembership={currentUserAccountMembership}
cardOrderVisible={cardOrderVisible}
physicalCardOrderVisible={physicalCardOrderVisible}
shouldDisplayIdVerification={
projectInfo.B2BMembershipIDVerification !== false
Expand Down
4 changes: 3 additions & 1 deletion clients/banking/src/components/MembershipsArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ type Props = {
accountId: string;
memberCreationVisible: boolean;
canAddCard: boolean;
cardOrderVisible: boolean;
physicalCardOrderVisible: boolean;
accountCountry: AccountCountry;
shouldDisplayIdVerification: boolean;
Expand Down Expand Up @@ -76,6 +77,7 @@ export const MembershipsArea = ({
accountId,
memberCreationVisible,
canAddCard,
cardOrderVisible,
physicalCardOrderVisible,
accountCountry,
shouldDisplayIdVerification,
Expand Down Expand Up @@ -352,7 +354,7 @@ export const MembershipsArea = ({
currentUserAccountMembership={currentUserAccountMembership}
editingAccountMembershipId={membership.id}
onAccountMembershipUpdate={onAccountMembershipUpdate}
canAddCard={canAddCard}
canAddCard={cardOrderVisible && canAddCard}
physicalCardOrderVisible={physicalCardOrderVisible}
accountCountry={accountCountry}
shouldDisplayIdVerification={shouldDisplayIdVerification}
Expand Down

0 comments on commit 7a48264

Please sign in to comment.