diff --git a/app/assets/javascripts/discourse/app/components/sidebar/anonymous/custom-sections.hbs b/app/assets/javascripts/discourse/app/components/sidebar/anonymous/custom-sections.hbs new file mode 100644 index 00000000000..80da8163d41 --- /dev/null +++ b/app/assets/javascripts/discourse/app/components/sidebar/anonymous/custom-sections.hbs @@ -0,0 +1,31 @@ + \ No newline at end of file diff --git a/app/assets/javascripts/discourse/app/components/sidebar/anonymous/custom-sections.js b/app/assets/javascripts/discourse/app/components/sidebar/anonymous/custom-sections.js new file mode 100644 index 00000000000..6d7fa593dd1 --- /dev/null +++ b/app/assets/javascripts/discourse/app/components/sidebar/anonymous/custom-sections.js @@ -0,0 +1,17 @@ +import Component from "@glimmer/component"; +import { inject as service } from "@ember/service"; +import Section from "discourse/components/sidebar/user/section"; + +export default class SidebarAnonymousCustomSections extends Component { + @service router; + @service site; + + get sections() { + return this.site.anonymous_sidebar_sections?.map((section) => { + return new Section({ + section, + router: this.router, + }); + }); + } +} diff --git a/app/assets/javascripts/discourse/app/components/sidebar/anonymous/sections.hbs b/app/assets/javascripts/discourse/app/components/sidebar/anonymous/sections.hbs index aee22d9ebbf..ced0920e93c 100644 --- a/app/assets/javascripts/discourse/app/components/sidebar/anonymous/sections.hbs +++ b/app/assets/javascripts/discourse/app/components/sidebar/anonymous/sections.hbs @@ -1,5 +1,6 @@