ui: show starting-from price in latest carousel
Fixes issue #33 https://redmine.halla-aho.net/issues/33
This commit is contained in:
parent
928c2f9bb9
commit
b03743dde6
2 changed files with 12 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
11
app/page.tsx
11
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() {
|
|||
</div>
|
||||
<h3 style={{ margin: '6px 0 4px' }}>{item.title}</h3>
|
||||
<p style={{ margin: 0 }}>{item.teaser}</p>
|
||||
{item.priceWeekdayEuros || item.priceWeekendEuros ? (
|
||||
<div style={{ color: '#cbd5e1', fontSize: 14, marginTop: 2 }}>
|
||||
{t('priceStartingFromShort', {
|
||||
price: Math.min(
|
||||
...([item.priceWeekdayEuros, item.priceWeekendEuros].filter((p): p is number => typeof p === 'number')),
|
||||
),
|
||||
})}
|
||||
</div>
|
||||
) : null}
|
||||
<div style={{ display: 'flex', gap: 8, marginTop: 10, flexWrap: 'wrap' }}>
|
||||
<Link className="button secondary" href={`/listings/${item.slug}`}>
|
||||
{t('openListing')}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue