From cef264ab1f46beb48a193683ca520ef8a64412b2 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Thu, 11 Aug 2022 18:47:15 +0100 Subject: [PATCH] DEV: Update welcome-topic-banner to use `@glimmer/component` (#17876) Now that all of our singletons have been converted to true Ember Services, we can remove our custom `discourse/component/glimmer` superclass and use explicit injection --- .../discourse/app/components/welcome-topic-banner.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/app/components/welcome-topic-banner.js b/app/assets/javascripts/discourse/app/components/welcome-topic-banner.js index e8778b4f84f..cef596d797e 100644 --- a/app/assets/javascripts/discourse/app/components/welcome-topic-banner.js +++ b/app/assets/javascripts/discourse/app/components/welcome-topic-banner.js @@ -1,10 +1,14 @@ -import GlimmerComponent from "discourse/components/glimmer"; +import Component from "@glimmer/component"; import { action } from "@ember/object"; import { getOwner } from "discourse-common/lib/get-owner"; import Topic from "discourse/models/topic"; import Composer from "discourse/models/composer"; +import { inject as service } from "@ember/service"; + +export default class WelcomeTopicBanner extends Component { + @service siteSettings; + @service store; -export default class WelcomeTopicBanner extends GlimmerComponent { @action editWelcomeTopic() { const topicController = getOwner(this).lookup("controller:topic");