Skip to content

Commit

Permalink
fix: lender profile stats bugs fixed (#5564)
Browse files Browse the repository at this point in the history
  • Loading branch information
roger-in-kiva authored Sep 30, 2024
1 parent f3fb621 commit 74cac0b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@godaddy/terminus": "^4.11.0",
"@graphql-tools/load": "^7.7.0",
"@graphql-tools/url-loader": "^7.17.18",
"@kiva/kv-components": "^3.102.2",
"@kiva/kv-components": "^3.102.3",
"@kiva/kv-shop": "^1.12.8",
"@kiva/kv-tokens": "^2.11.1",
"@mdi/js": "^7",
Expand Down
13 changes: 12 additions & 1 deletion src/components/LenderProfile/LenderStats.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<async-lender-section @visible="$emit('get-lender-stats')">
<section class="tw-my-8">
<section v-if="showStats" class="tw-my-8">
<div v-if="isLoading">
<kv-loading-placeholder
class="tw-mb-2"
Expand Down Expand Up @@ -45,6 +45,7 @@ export default {
data() {
return {
isLoading: true,
showStats: true,
};
},
components: {
Expand Down Expand Up @@ -97,6 +98,16 @@ export default {
if (Object.keys(this.lenderStats).length !== 0) {
this.isLoading = false;
}
const entries = Object.entries(this.lenderStats);
let values = [];
entries.forEach(element => {
if (element?.[1]?.values) {
values = [...element[1].values];
}
});
if (values.length === 0) {
this.showStats = false;
}
},
},
};
Expand Down

0 comments on commit 74cac0b

Please sign in to comment.