Rename method and variables for clarity

[MAILPOET-2624]
This commit is contained in:
Amine Ben hammou
2020-01-13 09:49:29 +01:00
committed by Jack Kitterhing
parent 5d59f53834
commit d2494469c0
6 changed files with 12 additions and 12 deletions

View File

@@ -4,12 +4,12 @@ import Notice from 'notices/notice.jsx';
const SubscribersLimitNotice = () => {
if (!window.mailpoet_subscribers_limit_reached) return null;
const hasKey = window.mailpoet_has_api_key;
const hasValidApiKey = window.mailpoet_has_valid_api_key;
const title = MailPoet.I18n.t('subscribersLimitNoticeTitle')
.replace('[subscribersLimit]', window.mailpoet_subscribers_limit);
const youReachedTheLimit = MailPoet.I18n.t(hasKey ? 'yourPlanLimit' : 'freeVersionLimit')
const youReachedTheLimit = MailPoet.I18n.t(hasValidApiKey ? 'yourPlanLimit' : 'freeVersionLimit')
.replace('[subscribersLimit]', window.mailpoet_subscribers_limit);
const upgradeLink = hasKey
const upgradeLink = hasValidApiKey
? 'https://account.mailpoet.com/upgrade'
: `https://account.mailpoet.com/?s=${window.mailpoet_subscribers_count + 1}`;
const refreshSubscribers = async () => {
@@ -38,7 +38,7 @@ const SubscribersLimitNotice = () => {
>
{MailPoet.I18n.t('upgradeNow')}
</a>
{hasKey && (
{hasValidApiKey && (
<>
{' '}
<button