don't show "No items" when loading
This commit is contained in:
committed by
pavel-mailpoet
parent
92f733d30d
commit
ddbabcfcb5
@@ -463,7 +463,11 @@ class NewsletterTemplates extends React.Component {
|
|||||||
} else {
|
} else {
|
||||||
let templates = this.state.templates[this.state.selectedTab] || [];
|
let templates = this.state.templates[this.state.selectedTab] || [];
|
||||||
if (templates.length === 0) {
|
if (templates.length === 0) {
|
||||||
|
if (this.state.loading) {
|
||||||
|
templates = null;
|
||||||
|
} else {
|
||||||
templates = <p>{MailPoet.I18n.t('noTemplates')}</p>;
|
templates = <p>{MailPoet.I18n.t('noTemplates')}</p>;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
templates = templates.map((template, index) => (
|
templates = templates.map((template, index) => (
|
||||||
<TemplateBox
|
<TemplateBox
|
||||||
|
Reference in New Issue
Block a user