🚧 Start to simplify component structure

This commit is contained in:
Philipp Stracker 2025-01-21 18:21:07 +01:00
parent c8261cf62c
commit a567ce7b51
No known key found for this signature in database
12 changed files with 200 additions and 171 deletions

View file

@ -1,35 +0,0 @@
import { __ } from '@wordpress/i18n';
import { CommonHooks } from '../../data';
const ConnectionInfo = () => {
const { merchant } = CommonHooks.useMerchantInfo();
return (
<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>
);
};
export default ConnectionInfo;
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>
);