refactor: streamline transaction page logic by consolidating state management and enhancing pagination, improving overall performance and maintainability
This commit is contained in:
18
components/transactions/transaction-utils.ts
Normal file
18
components/transactions/transaction-utils.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Utility functions for transaction formatting
|
||||
*/
|
||||
|
||||
export const formatCurrency = (amount: number): string => {
|
||||
return new Intl.NumberFormat("fr-FR", {
|
||||
style: "currency",
|
||||
currency: "EUR",
|
||||
}).format(amount);
|
||||
};
|
||||
|
||||
export const formatDate = (dateStr: string): string => {
|
||||
return new Date(dateStr).toLocaleDateString("fr-FR", {
|
||||
day: "2-digit",
|
||||
month: "short",
|
||||
year: "numeric",
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user