Skip to content

Commit

Permalink
feat: prioritizing matching text in loan tag component (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
roger-in-kiva authored Oct 23, 2023
1 parent 6fc84d3 commit 2ac6ec1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions @kiva/kv-components/vue/KvLoanTag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ export default {
return numeral(this.loan?.loanAmount).subtract(fundedAmount).subtract(reservedAmount).value();
},
variation() {
if (this.isLseLoan) {
if (this.loan?.matchingText) {
return 'matched-loan';
} if (this.isLseLoan) {
return 'lse-loan';
} if (differenceInDays(parseISO(this.loan?.plannedExpirationDate), Date.now()) <= 3) {
return 'ending-soon';
} if (this.amountLeft < 100 && this.amountLeft >= 0) {
return 'almost-funded';
} if (this.loan?.matchingText) {
return 'matched-loan';
}
return null;
},
Expand Down

0 comments on commit 2ac6ec1

Please sign in to comment.