Skip to content

Commit

Permalink
Merge pull request #5693 from kiva/fix-no-loans-copy
Browse files Browse the repository at this point in the history
fix: title when no loans
  • Loading branch information
christian14b authored Nov 18, 2024
2 parents 820ad04 + 941e02d commit dcf21ed
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/components/MyKiva/BorrowerCarousel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -180,16 +180,17 @@ const getBorrowerHash = loan => {
};
const title = computed(() => {
if (!loans.value.length) {
return 'Change a life <u>today</u>!';
}
if (!hasActiveLoans.value) {
return `You changed <u>${totalLoans.value} lives</u>!`;
}
if (loans.value.length) {
if (totalLoans.value === 1) {
return 'You’re <u>changing a life</u> right now!';
}
return `You’re <u>changing ${totalLoans.value} lives</u> right now!`;
if (totalLoans.value === 1) {
return 'You’re <u>changing a life</u> right now!';
}
return 'Change a life <u>today</u>!';
return `You’re <u>changing ${totalLoans.value} lives</u> right now!`;
});
const btnCta = computed(() => {
Expand Down

0 comments on commit dcf21ed

Please sign in to comment.