Skip to content

[Freeze Card] Add the “Freeze card” option in the Card Details panel. #81638

Description

@MariaHCD
  • Update ExpensifyCardPage/index.tsx to add the freeze/unfreeze option.
  • isCardFrozen will be checked using the card’s state and the existence of the frozen NVP.
// CardUtils.ts
function isCardFrozen(card?: OnyxEntry<Card>): boolean {
    return card?.state === CONST.EXPENSIFY_CARD.STATE.STATE_SUSPENDED && card?.nameValuePairs?.frozen != null;
}
{isCardHolder && !isCardFrozen(card) && (
    <MenuItem
        icon={Expensicons.FreezeCard}
        title={translate('cardPage.freezeCard')}
        style={styles.mt3}
        disabled={isOffline}
        onPress={() => (setIsFreezeModalVisible(true))}
    />
)}

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions