refactor: Reorganize imports and improve code consistency across components and API routes

This commit is contained in:
GitHub Copilot
2025-05-05 06:59:13 -04:00
parent d8a70e0f08
commit ad6693d1d7
14 changed files with 87 additions and 95 deletions

View File

@@ -1,6 +1,6 @@
---
import { formatCurrency, formatDate } from '../utils';
import type { Transaction } from '../types';
import { formatCurrency, formatDate } from '../utils';
interface Props {
transactions: Transaction[];
@@ -10,7 +10,7 @@ const { transactions } = Astro.props;
// Sort transactions by date descending for display
const sortedTransactions = [...transactions].sort(
(a, b) => new Date(b.date).getTime() - new Date(a.date).getTime()
(a, b) => new Date(b.date).getTime() - new Date(a.date).getTime(),
);
// TODO: UI/UX Improvements