mirror of
https://github.com/acedanger/finance.git
synced 2025-12-06 07:00:13 -08:00
style: apply Biome formatting to Astro templates and CSS (#27)
- Standardize HTML/CSS formatting - Fix template indentation - Apply consistent style to Astro components - Update component attributes formatting Part of #27
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
import { formatCurrency } from '../utils';
|
||||
import type { Account } from '../types';
|
||||
import { formatCurrency } from '../utils';
|
||||
|
||||
interface Props {
|
||||
account: Account;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
import TransactionTable from './TransactionTable.tsx';
|
||||
import type { Account } from '../types';
|
||||
import TransactionTable from './TransactionTable.tsx';
|
||||
|
||||
interface Props {
|
||||
account: Account;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
import type { Account } from '../types';
|
||||
import AccountSummary from './AccountSummary.tsx'; // Import the React component instead of the Astro one
|
||||
import AddTransactionForm from './AddTransactionForm.tsx';
|
||||
import type { Account } from '../types';
|
||||
|
||||
interface Props {
|
||||
accounts: Account[];
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
import BaseLayout from '../layouts/BaseLayout.astro';
|
||||
import Sidebar from '../components/Sidebar.astro';
|
||||
import MainContent from '../components/MainContent.astro';
|
||||
import Sidebar from '../components/Sidebar.astro';
|
||||
import BaseLayout from '../layouts/BaseLayout.astro';
|
||||
import type { Account, Transaction } from '../types';
|
||||
|
||||
export interface Props {
|
||||
@@ -28,7 +28,7 @@ const initialAccount: Account = accounts[0] || {
|
||||
let initialTransactions: Transaction[] = [];
|
||||
if (initialAccount.id) {
|
||||
const transactionsResponse = await fetch(
|
||||
`${baseUrl}/api/accounts/${initialAccount.id}/transactions`
|
||||
`${baseUrl}/api/accounts/${initialAccount.id}/transactions`,
|
||||
);
|
||||
initialTransactions = await transactionsResponse.json();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user