From b03743dde69cecfc058ed0d4ab7dfa210d1d7b13 Mon Sep 17 00:00:00 2001 From: Tero Halla-aho Date: Thu, 18 Dec 2025 13:30:48 +0200 Subject: [PATCH] ui: show starting-from price in latest carousel Fixes issue #33 https://redmine.halla-aho.net/issues/33 --- PROGRESS.md | 2 +- app/page.tsx | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/PROGRESS.md b/PROGRESS.md index be8a5ce..7ec40fa 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -88,4 +88,4 @@ - Forgejo deployment scaffolding added: Docker Compose + runner config guidance and Apache vhost for git.halla-aho.net, plus CI workflow placeholder under `.forgejo/workflows/`. - Amenities: added separate EV charging flags (on-site vs nearby) plus wheelchair accessibility, including browse filters and admin approvals view badges. - Navbar: combined admin actions (approvals/users/monitoring) under a single “Admin” dropdown menu. -- Pricing copy: treat listing prices as indicative “starting from” values and show starting-from line on browse cards. +- Pricing copy: treat listing prices as indicative “starting from” values and show starting-from line on browse cards + home latest carousel. diff --git a/app/page.tsx b/app/page.tsx index 1d3147b..945f05d 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -13,6 +13,8 @@ type LatestListing = { city: string; region: string; isSample: boolean; + priceWeekdayEuros: number | null; + priceWeekendEuros: number | null; }; export const dynamic = 'force-dynamic'; @@ -98,6 +100,15 @@ export default function HomePage() {

{item.title}

{item.teaser}

+ {item.priceWeekdayEuros || item.priceWeekendEuros ? ( +
+ {t('priceStartingFromShort', { + price: Math.min( + ...([item.priceWeekdayEuros, item.priceWeekendEuros].filter((p): p is number => typeof p === 'number')), + ), + })} +
+ ) : null}
{t('openListing')}