discourse/app/assets/javascripts/admin/addon/routes/admin-revamp-config-area.js
2024-03-06 18:05:11 +01:00

20 lines
565 B
JavaScript

import Route from "@ember/routing/route";
import { service } from "@ember/service";
import { dasherize } from "@ember/string";
import AdminConfigAreaSidebarExperiment from "admin/components/admin-config-area-sidebar-experiment";
const CONFIG_AREA_COMPONENT_MAP = {
"sidebar-experiment": AdminConfigAreaSidebarExperiment,
};
export default class AdminRevampConfigAreaRoute extends Route {
@service router;
async model(params) {
return {
area: params.area,
configAreaComponent: CONFIG_AREA_COMPONENT_MAP[dasherize(params.area)],
};
}
}