♻️ Set default message for SpinnerOverlay

This commit is contained in:
Philipp Stracker 2025-01-21 16:05:36 +01:00
parent e2f88cdef8
commit 8e4462d1fe
No known key found for this signature in database
2 changed files with 7 additions and 6 deletions

View file

@ -37,11 +37,7 @@ const SettingsApp = () => {
! merchantIsReady ||
! settingsIsReady
) {
return (
<SpinnerOverlay
message={ __( 'Loading…', 'woocommerce-paypal-payments' ) }
/>
);
return <SpinnerOverlay />;
}
if ( isSendOnlyCountry ) {
return <SendOnlyMessage />;

View file

@ -1,6 +1,11 @@
import { __ } from '@wordpress/i18n';
import { Spinner } from '@wordpress/components';
const SpinnerOverlay = ( { message = '' } ) => {
const SpinnerOverlay = ( { message = null } ) => {
if ( null === message ) {
message = __( 'Loading…', 'woocommerce-paypal-payments' );
}
return (
<div className="ppcp-r-spinner-overlay">
{ message && (