Skip to content

Commit 866a4c3

Browse files
thelostone-mcgravityblast
authored andcommitted
chore: update text on grant card
1 parent 7304c49 commit 866a4c3

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

app/assets/v2/js/grants/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,13 @@ if (document.getElementById('grants-showcase')) {
367367
}
368368

369369
getGrants.grants.forEach(function(item) {
370+
371+
const amount_received = Number(item.amount_received.replace(',', ''));
372+
const rounded_lifetime_amount = Math.round(amount_received / 1000) * 1000;
373+
374+
item.rounded_lifetime_amount = (rounded_lifetime_amount > 1000) ?
375+
`~$${rounded_lifetime_amount}` : 'Less than $1,000';
376+
370377
if (!vm.prevouslyLoadedGrants[item.id]) {
371378
vm.grants.push(item);
372379
vm.previouslyLoadedGrants[item.id] = item;

app/grants/templates/grants/components/card.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,10 @@ <h2 class="font-subheader">
243243
<div class="col" v-else>
244244
<!-- not on a round -->
245245
<p class="text-black h4 gc-font-base">
246-
$[[grant.amount_received || 0 | round | formatNumber]]
246+
[[grant.rounded_lifetime_amount]]
247247
</p>
248248
<p>
249-
total raised
249+
Estimated lifetime funding received
250250
</p>
251251
</div>
252252
<div class="col" v-if="grant.clr_round_num">

0 commit comments

Comments
 (0)