Skip to content

Commit

Permalink
fix: lent countries to value
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Bedon committed Nov 18, 2024
1 parent 89e7ab0 commit 5f926b0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
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

0 comments on commit 5f926b0

Please sign in to comment.