Skip to content

Commit

Permalink
feat(CollectiveCard): display ORGANIZATION stats
Browse files Browse the repository at this point in the history
  • Loading branch information
HipsterBrown authored and znarf committed May 19, 2018
1 parent 471dcd3 commit 4ba3e57
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion src/components/CollectiveCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class CollectiveCard extends React.Component {
<div className="description">{description}</div>
</div>
<div className="footer">
{ collective.stats &&
{ collective.stats && collective.type === 'COLLECTIVE' &&
<div className="stats">
<div className="backers">
<div className="value">{collective.stats.backers.all}</div>
Expand All @@ -238,6 +238,28 @@ class CollectiveCard extends React.Component {
</div>
</div>
}
{ collective.stats && collective.memberOf && collective.type === 'ORGANIZATION' && (
<div className="stats">
<div className="backers">
<div className="value">{collective.memberOf.length}</div>
<div className="label">
<FormattedMessage
id="collective.card.memberOf.count"
defaultMessage="{n, plural, one {collective} other {collectives}} backed"
values={{ n: collective.memberOf.length }}
/>
</div>
</div>
<div className="yearlyBudget">
<div className="value">
<Currency value={collective.stats.totalAmountSent} currency={collective.currency} />
</div>
<div className="label">
<FormattedMessage id="collective.card.stats.totalAmountSent" defaultMessage="contributed" />
</div>
</div>
</div>
) }
{ membership &&
<div className="membership">
<div className="role">{tierName}</div>
Expand Down

0 comments on commit 4ba3e57

Please sign in to comment.