mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +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
|
<ConnectionStatusBadge
|
||||||
isActive={ merchant.isConnected }
|
isActive={ merchant.isConnected }
|
||||||
isSandbox={ merchant.isSandbox }
|
isSandbox={ merchant.isSandbox }
|
||||||
|
isBusinessSeller={ merchant.isBusinessSeller }
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -5,11 +5,19 @@ import TitleBadge, {
|
||||||
TITLE_BADGE_POSITIVE,
|
TITLE_BADGE_POSITIVE,
|
||||||
} from '../../../../../ReusableComponents/TitleBadge';
|
} from '../../../../../ReusableComponents/TitleBadge';
|
||||||
|
|
||||||
const ConnectionStatusBadge = ( { isActive, isSandbox } ) => {
|
const ConnectionStatusBadge = ( { isActive, isSandbox, isBusinessSeller } ) => {
|
||||||
if ( isActive ) {
|
if ( isActive ) {
|
||||||
const label = isSandbox
|
let label;
|
||||||
? __( 'Sandbox Mode', 'woocommerce-paypal-payments' )
|
|
||||||
: __( 'Active', 'woocommerce-paypal-payments' );
|
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 } />;
|
return <TitleBadge type={ TITLE_BADGE_POSITIVE } text={ label } />;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue