2024-11-11 14:02:49 +01:00
|
|
|
import { __ } from '@wordpress/i18n';
|
2025-01-13 15:21:36 +01:00
|
|
|
import { CommonHooks } from '../../data';
|
2025-01-10 16:43:01 +01:00
|
|
|
|
|
|
|
const ConnectionInfo = () => {
|
2025-01-13 15:21:36 +01:00
|
|
|
const { merchant } = CommonHooks.useMerchantInfo();
|
2024-11-11 14:02:49 +01:00
|
|
|
|
|
|
|
return (
|
2025-01-13 15:21:55 +01:00
|
|
|
<div className="ppcp-r-connection-status__data">
|
|
|
|
<StatusRow
|
|
|
|
label={ __( 'Merchant ID', 'woocommerce-paypal-payments' ) }
|
|
|
|
value={ merchant.id }
|
|
|
|
/>
|
|
|
|
<StatusRow
|
|
|
|
label={ __( 'Email address', 'woocommerce-paypal-payments' ) }
|
|
|
|
value={ merchant.email }
|
|
|
|
/>
|
|
|
|
<StatusRow
|
|
|
|
label={ __( 'Client ID', 'woocommerce-paypal-payments' ) }
|
|
|
|
value={ merchant.clientId }
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
);
|
2024-11-11 14:02:49 +01:00
|
|
|
};
|
|
|
|
export default ConnectionInfo;
|
|
|
|
|
2025-01-13 15:21:55 +01:00
|
|
|
const StatusRow = ( { label, value } ) => (
|
|
|
|
<div className="ppcp-r-connection-status__status-row">
|
|
|
|
<span className="ppcp-r-connection-status__status-label">
|
|
|
|
{ label }
|
|
|
|
</span>
|
|
|
|
<span className="ppcp-r-connection-status__status-value">
|
|
|
|
{ value }
|
|
|
|
</span>
|
|
|
|
</div>
|
2025-01-10 16:43:01 +01:00
|
|
|
);
|