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:
Peter Wood
2025-05-04 10:00:14 -04:00
parent 58d8ebdfa1
commit 1d540d1731
5 changed files with 8 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
--- ---
import { formatCurrency } from '../utils';
import type { Account } from '../types'; import type { Account } from '../types';
import { formatCurrency } from '../utils';
interface Props { interface Props {
account: Account; account: Account;

View File

@@ -1,6 +1,6 @@
--- ---
import TransactionTable from './TransactionTable.tsx';
import type { Account } from '../types'; import type { Account } from '../types';
import TransactionTable from './TransactionTable.tsx';
interface Props { interface Props {
account: Account; account: Account;

View File

@@ -1,7 +1,7 @@
--- ---
import type { Account } from '../types';
import AccountSummary from './AccountSummary.tsx'; // Import the React component instead of the Astro one import AccountSummary from './AccountSummary.tsx'; // Import the React component instead of the Astro one
import AddTransactionForm from './AddTransactionForm.tsx'; import AddTransactionForm from './AddTransactionForm.tsx';
import type { Account } from '../types';
interface Props { interface Props {
accounts: Account[]; accounts: Account[];

View File

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

View File

@@ -1,7 +1,7 @@
--- ---
import BaseLayout from '../layouts/BaseLayout.astro';
import Sidebar from '../components/Sidebar.astro';
import MainContent from '../components/MainContent.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'; import type { Account, Transaction } from '../types';
export interface Props { export interface Props {
@@ -28,7 +28,7 @@ const initialAccount: Account = accounts[0] || {
let initialTransactions: Transaction[] = []; let initialTransactions: Transaction[] = [];
if (initialAccount.id) { if (initialAccount.id) {
const transactionsResponse = await fetch( const transactionsResponse = await fetch(
`${baseUrl}/api/accounts/${initialAccount.id}/transactions` `${baseUrl}/api/accounts/${initialAccount.id}/transactions`,
); );
initialTransactions = await transactionsResponse.json(); initialTransactions = await transactionsResponse.json();
} }