Replacing accountNumber with a new API field

API development was already completed to accept the new token when called.

Currently, we only have methods that show account numbers and mask them.

When someone has a protection field enabled though, I want to replace the account number/mask with the new Token from the API.

….how do I go about implementing this? JavaScript/React.

export interface TokenProps {
accNbr?: string;
tokenForExample?: string;
}

export const Token: React.FC<TokenProps> = ({
accNbr,
tokenForExample
})
// If tokenForExample == true {
// Do something()
}