From c0f87e4b16af441ddf22b60d34e440c94aec3be0 Mon Sep 17 00:00:00 2001 From: oskarrough Date: Fri, 27 Oct 2023 20:52:12 +0200 Subject: [PATCH] Remove demo hastag mentions --- src/pages/r4-page-channel-tracks.js | 32 ++++------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/src/pages/r4-page-channel-tracks.js b/src/pages/r4-page-channel-tracks.js index dad1a9a3..eeeb4cd3 100644 --- a/src/pages/r4-page-channel-tracks.js +++ b/src/pages/r4-page-channel-tracks.js @@ -22,13 +22,6 @@ export default class R4PageChannelTracks extends BaseChannel { searchParams: {type: Object, state: true}, } - constructor() { - super() - // this.channel = null - // this.tracks = [] - // this.query = {} - } - async connectedCallback() { super.connectedCallback() const {data, error} = await sdk.channels.readChannel(this.slug) @@ -45,7 +38,7 @@ export default class R4PageChannelTracks extends BaseChannel { get queryWithDefaults() { const q = {...this.query} if (q.filters?.length) { - q.filters = [...q.filters, this.defaultFilters] + q.filters = [...q.filters, ...this.defaultFilters] } else { q.filters = this.defaultFilters } @@ -199,26 +192,17 @@ export default class R4PageChannelTracks extends BaseChannel { renderTracksMenu() { if (!this.tracks) return null - - let filter = JSON.stringify({column: 'tags', operator: 'neq', value: '{}'}) - const tagsHref = `${this.tracksOrigin}?filters=[${filter}]` - filter = JSON.stringify({column: 'tags', operator: 'contains', value: 'jazz'}) - const jazzTagHref = `${this.tracksOrigin}?filters=[${filter}]` - filter = JSON.stringify({column: 'mentions', operator: 'neq', value: '{}'}) - const mentionsHref = `${this.tracksOrigin}?filters=[${filter}]` - return html` -
  • ${this.slug}
  • +
  • @${this.slug}
  • -
  • ${this.renderTracksCount()}
  • -
  • @Mentions
  • -
  • #Tags
  • -
  • #jazz
  • ` } - renderTracksCount() { - if (this.query.filters) { - return html`${this.count} tracks` - } - } createTagUrl(tag) { const filter = JSON.stringify({column: 'tags', operator: 'contains', value: tag})