Skip to content

A platform for community discussion. Free, open, simple.

FIX: move main sidebar panel name to constant (#22819)

Krzysztof Kotlarek7fb4bd3f431c
diff --git a/app/assets/javascripts/discourse/app/services/sidebar-state.js b/app/assets/javascripts/discourse/app/services/sidebar-state.js
index 25b132b335d..ef6f995d0c9 100644
--- a/app/assets/javascripts/discourse/app/services/sidebar-state.js
+++ b/app/assets/javascripts/discourse/app/services/sidebar-state.js
@@ -8,6 +8,7 @@ import {
const COMBINED_MODE = "combined";
const SEPARATED_MODE = "separated";
+const MAIN_PANEL = "main";
export default class SidebarState extends Service {
@tracked currentPanelKey = currentPanelKey;
@@ -35,7 +36,7 @@ export default class SidebarState extends Service {
setCombinedMode() {
this.mode = COMBINED_MODE;
- this.currentPanelKey = "main";
+ this.currentPanelKey = MAIN_PANEL;
}
get combinedMode() {
@@ -43,7 +44,7 @@ export default class SidebarState extends Service {
}
get showMainPanel() {
- return this.currentPanelKey === "main";
+ return this.currentPanelKey === MAIN_PANEL;
}
#reset() {