Prevent displaying notice if no plan active

[MAILPOET-2832]
This commit is contained in:
Pavel Dohnal
2020-04-27 10:55:41 +02:00
committed by Veljko V
parent fd1687020e
commit c9c949a1e7
3 changed files with 11 additions and 3 deletions

View File

@@ -4,10 +4,12 @@ import HelpTooltip from 'help-tooltip.jsx';
type Props = {
subscribersLimit: number | false,
hasValidApiKey: boolean,
};
const SubscribersLimit = ({ subscribersLimit }: Props) => {
const SubscribersLimit = ({ subscribersLimit, hasValidApiKey }: Props) => {
if (!subscribersLimit) return null;
if (!hasValidApiKey) return null;
return (
<h3>
{MailPoet.I18n.t('subscribersInPlan')