Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: lent to countries stat #5692

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/MyKiva/MyKivaStats.vue
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ onMounted(() => {
totalAmountLent.value = result.data?.my?.userStats?.amount_of_loans ?? 0;
// Handle new user use-case
totalAmountLent.value = totalAmountLent.value === '0.00' ? 0 : totalAmountLent.value;
totalCountriesLentTo.value = result.data?.my?.statsPerCountry?.totalCount ?? 0;
totalCountriesLentTo.value = result.data?.my?.lendingStats?.lentTo?.countries?.totalCount ?? 0;
isLoaded.value = true;
}).catch(e => {
logReadQueryError(e, 'MyKivaPage myKivaQuery');
Expand Down
19 changes: 11 additions & 8 deletions src/graphql/query/myLendingStats.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,20 @@ query myLendingStats {
name
}
lentTo {
borrowers {
totalCount
}
}
borrowers {
totalCount
}
countries {
totalCount
}
}
}
userStats {
amount_of_loans
}
amount_of_loans
}
statsPerCountry {
totalCount
}
totalCount
}
}
lend {
countryFacets {
Expand Down
Loading