Remove "further reading" step from wizard (#10825)

Instead, add link to top themes on meta in wizard's last step.
This commit is contained in:
Penar Musaraj
2020-10-05 15:06:05 -04:00
committed by GitHub
parent 00afd308c1
commit 4efbf8dc4f
6 changed files with 3 additions and 78 deletions

View File

@@ -1,30 +0,0 @@
import Component from "@ember/component";
import { POPULAR_THEMES } from "discourse-common/helpers/popular-themes";
export default Component.extend({
classNames: ["popular-themes"],
init() {
this._super(...arguments);
this.popular_components = this.selectedThemeComponents();
},
selectedThemeComponents() {
return this.shuffle()
.filter((theme) => theme.component)
.slice(0, 5);
},
shuffle() {
let array = POPULAR_THEMES;
// https://stackoverflow.com/a/12646864
for (let i = array.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[array[i], array[j]] = [array[j], array[i]];
}
return array;
},
});

View File

@@ -1,5 +0,0 @@
{{#each popular_components as |theme|}}
<a class="popular-theme-item" href={{theme.meta_url}} rel="noopener noreferrer" target="_blank">
{{theme.name}}
</a>
{{/each}}