Fix the lint

This commit is contained in:
Narek Zakarian 2024-11-26 15:01:21 +04:00
parent e2092d23f0
commit f3d5c56663
No known key found for this signature in database
GPG key ID: 07AFD7E7A9C164A7
5 changed files with 888 additions and 620 deletions

View file

@ -1,18 +1,18 @@
import { __ } from '@wordpress/i18n';
const generatePriceText = (type, selectedCountryPrice, storeCurrency) => {
if (!selectedCountryPrice || !selectedCountryPrice[type]) {
console.warn(`Invalid type or price data for: ${type}`);
return '';
}
const generatePriceText = ( type, selectedCountryPrice, storeCurrency ) => {
if ( ! selectedCountryPrice || ! selectedCountryPrice[ type ] ) {
console.warn( `Invalid type or price data for: ${ type }` );
return '';
}
const percentage = selectedCountryPrice[type].toFixed(2);
const fixedFee = `${selectedCountryPrice.currencySymbol}${selectedCountryPrice.fixedFee}`;
const percentage = selectedCountryPrice[ type ].toFixed( 2 );
const fixedFee = `${ selectedCountryPrice.currencySymbol }${ selectedCountryPrice.fixedFee }`;
return __(
`from ${percentage}% + ${fixedFee} ${storeCurrency}<sup>1</sup>`,
'woocommerce-paypal-payments'
);
return __(
`from ${ percentage }% + ${ fixedFee } ${ storeCurrency }<sup>1</sup>`,
'woocommerce-paypal-payments'
);
};
export default generatePriceText;