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 f59bca6 commit 0243777
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions _pages/rankings.html
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ <h5 class="card-title">${this.profileTitle(item)}</h5>
render() {
const isLoading = this.stocks.isEmpty;

return html`
const topHtml = html`
${halfmoonCssTag}
<div class="input-group mb-2" role="group" aria-label="Influencer Sorting" style="margin:auto;justify-content:center;height:48px;">
<button
Expand All @@ -450,11 +450,21 @@ <h5 class="card-title">${this.profileTitle(item)}</h5>
<div class="input-group mb-3" role="group" aria-label="Stocks" style="margin:auto;justify-content:center;">
${ isLoading ? this.renderLoadingBar() : this.renderStocks() }
</div>
<influencer-summary
height="80" .selectedStockItem=${this.selectedStockItem} .influencers=${this.influencers}
@select-stock-event="${(e) => { this.selectFunction(e.detail) }}"
></influencer-summary>
`;
if(this.influencers.length > 0){
return html`
${topHtml}
<influencer-summary
height="80" .selectedStockItem=${this.selectedStockItem} .influencers=${this.influencers}
@select-stock-event="${(e) => { this.selectFunction(e.detail) }}"
></influencer-summary>
`;
} else {
return html`
${ topHtml }
${ this.renderLoadingBar() }
`;
}
}

renderLoadingBar() {
Expand Down

0 comments on commit 0243777

Please sign in to comment.