format currency with thousand separators (#81)

This commit is contained in:
Lauri Vuorela
2024-02-05 02:16:30 +01:00
committed by GitHub
parent fb49fb596a
commit be0964d9e1
5 changed files with 17 additions and 11 deletions

View File

@@ -1,5 +1,6 @@
import { Button } from '@/components/ui/button'
import { Reimbursement } from '@/lib/balances'
import { formatCurrency } from '@/lib/utils'
import { Participant } from '@prisma/client'
import Link from 'next/link'
@@ -42,9 +43,7 @@ export function ReimbursementList({
</Link>
</Button>
</div>
<div>
{currency} {(reimbursement.amount / 100).toFixed(2)}
</div>
<div>{formatCurrency(currency, reimbursement.amount)}</div>
</div>
))}
</div>