feat: add number of total answers

This commit is contained in:
thomas
2024-07-02 18:03:51 +02:00
parent 11dd689e53
commit 45353aa55a

View File

@@ -7,6 +7,7 @@
let loading = true;
let error = null;
let isUsernamePresent = false;
let globalCount = 0;
token.subscribe(token => {
if (token) {
@@ -34,6 +35,8 @@
break;
}
globalCount = globalCount + items.length;
items.forEach(pr => {
const userLogin = pr.user.login;
if (prCounts[userLogin]) {
@@ -76,6 +79,7 @@
{#if !$isConnected}
<div class="important-block not-connected">Log in to Github to see the list</div>
{:else}
🔥Total Answers: <span class="global-count">{ globalCount }</span>
{#if isUsernamePresent}
<div class="link-username">
<a href={`#${$username}`}>Check my position</a>
@@ -102,6 +106,11 @@
margin-top: 1rem;
}
.global-count {
color: red;
font-size: 20px;
}
.link-username {
margin-top: 2rem;
width: 100%;