added location total to UI

This commit is contained in:
2024-01-09 10:51:05 +01:00
parent c0b108bc65
commit c76a69df5b
3 changed files with 38 additions and 24 deletions

6
app/lib/formatStrings.ts Normal file
View File

@@ -0,0 +1,6 @@
export const formatCurrency = (amount:number) => {
// format number wirh 2 decimal places and a thousand separator
const formattedAmount = (amount/100).toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,');
return(formattedAmount);
}