Skip to content

Commit

Permalink
use humanize
Browse files Browse the repository at this point in the history
  • Loading branch information
ap-justin committed Jan 3, 2024
1 parent 55cfa63 commit 904e831
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/pages/Leaderboard/DonationMetrics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ import {
dummyDonationsMetricList as metricsPlaceholder,
useMetricsListQuery,
} from "services/aws/business_metrics";
import { humanize } from "helpers";

export default function DonationMetrics() {
const { data: metrics = metricsPlaceholder } = useMetricsListQuery({});

return (
<div className="text-center">
<h2 className="my-3 text-3xl font-extrabold">
Total Donations: ${" "}
{`${Number(
metrics.donations_total_amount_v2.toFixed(2)
).toLocaleString()}`}
Total Donations: $ {humanize(metrics.donations_total_amount_v2, 2)}
</h2>
{/*<h3 className="text-xl font-semibold">
Daily Donations Total: ${" "}
Expand Down

0 comments on commit 904e831

Please sign in to comment.