From 0e13f60d1498f2ca0088836f4af951f6bfaa9b27 Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Wed, 4 Feb 2026 22:02:17 +0000 Subject: [PATCH] Improve Directus integration and homepage dynamic events - Add auth token to asset URLs for proper image access - Map Directus artwork fields (name->title, price_gbp/usd->price, notes->description) - Add currency field (GBP/USD) based on available price - Fetch upcoming events dynamically on homepage - Prefer artworks with images for featured display - Add proper error handling for artwork lookups Co-Authored-By: Claude Opus 4.5 --- frontend/src/app/checkout/page.tsx | 6 +- frontend/src/app/events/page.tsx | 10 +-- frontend/src/app/page.tsx | 89 +++++++++++--------- frontend/src/app/store/[slug]/page.tsx | 4 +- frontend/src/components/artwork-card.tsx | 4 +- frontend/src/components/cart-drawer.tsx | 4 +- frontend/src/lib/directus.ts | 102 +++++++++++++++-------- 7 files changed, 130 insertions(+), 89 deletions(-) diff --git a/frontend/src/app/checkout/page.tsx b/frontend/src/app/checkout/page.tsx index abf697c..3101606 100644 --- a/frontend/src/app/checkout/page.tsx +++ b/frontend/src/app/checkout/page.tsx @@ -231,7 +231,7 @@ export default function CheckoutPage() { {item.artwork.medium && (

{item.artwork.medium}

)} -

£{item.price.toLocaleString()}

+

{item.artwork.currency === 'GBP' ? '£' : '$'}{item.price.toLocaleString()}