REFACTOR: Remove `router:main` and `getOwner`

This commit is contained in:
Robin Ward 2020-08-13 15:42:03 -04:00
parent cf466f7b84
commit 6a9bde3bf4
1 changed files with 5 additions and 6 deletions

View File

@ -2,11 +2,12 @@ import { gt, equal } from "@ember/object/computed";
import Component from "@ember/component";
import { THEMES, COMPONENTS } from "admin/models/theme";
import discourseComputed from "discourse-common/utils/decorators";
import { getOwner } from "@ember/application";
import { inject as service } from "@ember/service";
export default Component.extend({
THEMES: THEMES,
COMPONENTS: COMPONENTS,
router: service(),
THEMES,
COMPONENTS,
classNames: ["themes-list"],
@ -71,9 +72,7 @@ export default Component.extend({
}
},
navigateToTheme(theme) {
getOwner(this)
.lookup("router:main")
.transitionTo("adminCustomizeThemes.show", theme);
this.router.transitionTo("adminCustomizeThemes.show", theme);
}
}
});