Skip to content

Commit

Permalink
loading
Browse files Browse the repository at this point in the history
  • Loading branch information
steskelt committed Mar 27, 2024
1 parent 523af87 commit e95c61b
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions _pages/rankings.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ <h1 class="display-6 fw-bold text-center">Influencer Rankings</h1>
const style = isMini ? 'width:30px;margin-left:10px;' : '';
if (influencer.meta.type == "twitter" || influencer.meta.type == "x") return html`<img src="/assets/integrations/x.svg" style=${style}>`;
if (influencer.meta.type == "youtube") return html`<img src="/assets/integrations/youtube.svg" style=${style}>`;
if (influencer.meta.type == "substack") return html`<img src="/assets/integrations/substack.svg" style=${style}>`;
if (influencer.meta.type == "web" || influencer.meta.type == "url") return html`<img src="/assets/integrations/webpages.svg" style=${style}>`;
return html``;
}
Expand All @@ -146,6 +147,9 @@ <h1 class="display-6 fw-bold text-center">Influencer Rankings</h1>
return html`<span>${humanNumber(meta.subscriberCount)} Subscribers</span><br>
<span>${humanNumber(meta.viewCount)} Total Views</span>`;
}
if (meta.type == "substack") {
return html`<span>${humanNumber(meta.subscriberCount)} Subscribers</span>`;
}
if (meta.type == "web") {
if (meta.author != null && meta.author != "") {
return html`<h6 class="card-subtitle text-muted">${meta.author}</h6>
Expand Down Expand Up @@ -519,21 +523,21 @@ <h5 class="card-title">${this.profileTitle(item)}</h5>

fetchInfluencers(){

const symbol = this.selectedStockItem == null ? '' : '/' + this.selectedStockItem.symbol;
const url = 'https://cf.tradeaudit.app/influencers/' + (this.isTop ? 'top' : 'bottom') + symbol;

// Making our request
fetch(url, { method: 'GET' })
.then(Result => Result.json())
.then(body => {
this.influencers = body.influencers;
this.requestUpdate();
})
.catch(errorMsg => {
console.log(errorMsg);
this.influencers = [];
this.requestUpdate();
});
<!-- const symbol = this.selectedStockItem == null ? '' : '/' + this.selectedStockItem.symbol;-->
<!-- const url = 'https://cf.tradeaudit.app/influencers/' + (this.isTop ? 'top' : 'bottom') + symbol;-->
<!-- -->
<!-- // Making our request-->
<!-- fetch(url, { method: 'GET' })-->
<!-- .then(Result => Result.json())-->
<!-- .then(body => {-->
<!-- this.influencers = body.influencers;-->
<!-- this.requestUpdate();-->
<!-- })-->
<!-- .catch(errorMsg => { -->
<!-- console.log(errorMsg);-->
<!-- this.influencers = [];-->
<!-- this.requestUpdate();-->
<!-- });-->
}
}
customElements.define('stock-toolbar', StockToolbar);
Expand Down

0 comments on commit e95c61b

Please sign in to comment.