mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 13:44:42 +08:00
💄 Display account type in connection badge
This commit is contained in:
parent
a6868ec0ca
commit
5ce891fe25
2 changed files with 13 additions and 4 deletions
|
@ -27,6 +27,7 @@ const ConnectionStatus = () => {
|
|||
<ConnectionStatusBadge
|
||||
isActive={ merchant.isConnected }
|
||||
isSandbox={ merchant.isSandbox }
|
||||
isBusinessSeller={ merchant.isBusinessSeller }
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
|
|
@ -5,11 +5,19 @@ import TitleBadge, {
|
|||
TITLE_BADGE_POSITIVE,
|
||||
} from '../../../../../ReusableComponents/TitleBadge';
|
||||
|
||||
const ConnectionStatusBadge = ( { isActive, isSandbox } ) => {
|
||||
const ConnectionStatusBadge = ( { isActive, isSandbox, isBusinessSeller } ) => {
|
||||
if ( isActive ) {
|
||||
const label = isSandbox
|
||||
? __( 'Sandbox Mode', 'woocommerce-paypal-payments' )
|
||||
: __( 'Active', 'woocommerce-paypal-payments' );
|
||||
let label;
|
||||
|
||||
if ( isBusinessSeller ) {
|
||||
label = isSandbox
|
||||
? __( 'Business | Sandbox', 'woocommerce-paypal-payments' )
|
||||
: __( 'Business | Live', 'woocommerce-paypal-payments' );
|
||||
} else {
|
||||
label = isSandbox
|
||||
? __( 'Sandbox', 'woocommerce-paypal-payments' )
|
||||
: __( 'Active', 'woocommerce-paypal-payments' );
|
||||
}
|
||||
|
||||
return <TitleBadge type={ TITLE_BADGE_POSITIVE } text={ label } />;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue