diff --git a/app/assets/javascripts/admin/addon/components/dashboard-new-feature-item.gjs b/app/assets/javascripts/admin/addon/components/dashboard-new-feature-item.gjs index bc934f03383..a086209a3e1 100644 --- a/app/assets/javascripts/admin/addon/components/dashboard-new-feature-item.gjs +++ b/app/assets/javascripts/admin/addon/components/dashboard-new-feature-item.gjs @@ -2,7 +2,6 @@ import Component from "@glimmer/component"; import { tracked } from "@glimmer/tracking"; import { on } from "@ember/modifier"; import { action } from "@ember/object"; -import didInsert from "@ember/render-modifiers/modifiers/did-insert"; import { service } from "@ember/service"; import { htmlSafe } from "@ember/template"; import { and, not } from "truth-helpers"; @@ -11,22 +10,15 @@ import DToggleSwitch from "discourse/components/d-toggle-switch"; import { ajax } from "discourse/lib/ajax"; import { popupAjaxError } from "discourse/lib/ajax-error"; import dIcon from "discourse-common/helpers/d-icon"; -import { bind } from "discourse-common/utils/decorators"; import { i18n } from "discourse-i18n"; import DTooltip from "float-kit/components/d-tooltip"; export default class DiscourseNewFeatureItem extends Component { @service siteSettings; @service toasts; - @tracked experimentEnabled; + @tracked experimentEnabled = this.args.item.experiment_enabled; @tracked toggleExperimentDisabled = false; - @bind - initEnabled() { - this.experimentEnabled = - this.siteSettings[this.args.item.experiment_setting]; - } - @action async toggleExperiment() { if (this.toggleExperimentDisabled) { @@ -68,7 +60,7 @@ export default class DiscourseNewFeatureItem extends Component { }