Fixed "invoking component by passing its name" deprecations for newsletter modals

no issue

- in future Ember build tooling components must be imported directly rather than passing a name at runtime
This commit is contained in:
Kevin Ansfield 2022-11-03 10:14:37 +00:00
parent d1a061e5a7
commit 86751f902c
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,7 @@
import Component from '@glimmer/component';
import ConfirmArchiveModal from '../../modals/newsletters/confirm-archive';
import ConfirmUnarchiveModal from '../../modals/newsletters/confirm-unarchive';
import MultipleNewslettersLimitModal from '../../modals/limits/multiple-newsletters';
import {action} from '@ember/object';
import {inject as service} from '@ember/service';
import {task} from 'ember-concurrency';
@ -98,7 +99,7 @@ export default class NewsletterManagementComponent extends Component {
} catch (error) {
if (error.errorType === 'HostLimitError') {
// Not allowed: we reached the limit here
this.modals.open('modals/limits/multiple-newsletters', {
this.modals.open(MultipleNewslettersLimitModal, {
message: error.message
});
return;

View File

@ -1,4 +1,5 @@
import AdminRoute from 'ghost-admin/routes/admin';
import MultipleNewslettersLimitModal from '../../../components/modals/limits/multiple-newsletters';
import NewNewsletterModal from '../../../components/modals/newsletters/new';
import {action} from '@ember/object';
import {inject as service} from '@ember/service';
@ -21,7 +22,7 @@ export default class NewNewsletterRoute extends AdminRoute {
} catch (error) {
if (error.errorType === 'HostLimitError') {
// Not allowed: we reached the limit here
this.modals.open('modals/limits/multiple-newsletters', {
this.modals.open(MultipleNewslettersLimitModal, {
message: error.message
});
return this.replaceWith('settings.newsletters');