From bb6bd754347b2417bfe3600d1564ec5f49139ba1 Mon Sep 17 00:00:00 2001 From: GitHub Copilot Date: Thu, 24 Apr 2025 08:37:33 -0400 Subject: [PATCH] Refactor index.astro to improve type safety, enhance UI update functions, and streamline event handling for transactions --- src/pages/index.astro | 82 +++++++++++++++++++++++-------------------- src/types/events.ts | 13 +++++++ 2 files changed, 57 insertions(+), 38 deletions(-) create mode 100644 src/types/events.ts diff --git a/src/pages/index.astro b/src/pages/index.astro index 10b6aac..b0036dc 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -3,6 +3,7 @@ import BaseLayout from '../layouts/BaseLayout.astro'; import Sidebar from '../components/Sidebar.astro'; import MainContent from '../components/MainContent.astro'; import type { Account, Transaction } from '../types'; +import type { TransactionEventDetail } from '../types/events'; import { formatCurrency, formatDate } from '../utils'; // Fetch accounts from API @@ -32,23 +33,29 @@ if (initialAccount.id) {