Skip to content

Commit 619ebda

Browse files
committed
UX: don't show in admin area
1 parent 092c614 commit 619ebda

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

javascripts/discourse/components/sidebar-new-topic-button.gjs

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default class SidebarNewTopicButton extends Component {
1818
@tracked tag;
1919

2020
get shouldRender() {
21-
return this.currentUser;
21+
return this.currentUser && !this.router.currentRouteName.includes("admin");
2222
}
2323

2424
get canCreateTopic() {
@@ -69,8 +69,8 @@ export default class SidebarNewTopicButton extends Component {
6969

7070
@action
7171
getCategoryandTag() {
72-
this.category = this.router.currentRoute.attributes.category || null;
73-
this.tag = this.router.currentRoute.attributes.tag || null;
72+
this.category = this.router.currentRoute.attributes?.category || null;
73+
this.tag = this.router.currentRoute.attributes?.tag || null;
7474
}
7575

7676
<template>

0 commit comments

Comments
 (0)