FEATURE: Show gists everywhere except suggested/related (#995)
This commit is contained in:
@@ -7,15 +7,9 @@ export default class Gists extends Service {
|
||||
@tracked preference = localStorage.getItem("topicListLayout");
|
||||
|
||||
get shouldShow() {
|
||||
const currentRoute = this.router.currentRoute.name;
|
||||
const isDiscovery = currentRoute.includes("discovery");
|
||||
const isNotCategories = !currentRoute.includes("categories");
|
||||
const gistsAvailable =
|
||||
this.router.currentRoute.attributes?.list?.topics?.some(
|
||||
(topic) => topic.ai_topic_gist
|
||||
);
|
||||
|
||||
return isDiscovery && isNotCategories && gistsAvailable;
|
||||
return this.router.currentRoute.attributes?.list?.topics?.some(
|
||||
(topic) => topic.ai_topic_gist
|
||||
);
|
||||
}
|
||||
|
||||
setPreference(value) {
|
||||
|
||||
Reference in New Issue
Block a user