From e60c0c64e1f89381603c8aaeadfebcf5f9531a42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Alves=20R=C3=B6sel?= <60182044+velocitatem@users.noreply.github.com> Date: Tue, 13 Jan 2026 15:35:27 +0100 Subject: [PATCH] Pre run web refactors (#43) * chore: refactor date utilities * feat: improve images of hotel rooms * fix: adding date utils --- web/src/components/feats/hotel/HotelCard.tsx | 5 +- .../components/feats/hotel/HotelDetails.tsx | 5 +- web/src/lib/airline-utils.ts | 24 +-------- web/src/lib/date-utils.ts | 23 ++++++++ web/src/lib/hotel-utils.ts | 52 +++++++++++-------- 5 files changed, 60 insertions(+), 49 deletions(-) create mode 100644 web/src/lib/date-utils.ts diff --git a/web/src/components/feats/hotel/HotelCard.tsx b/web/src/components/feats/hotel/HotelCard.tsx index 5bf234d..847e1b2 100644 --- a/web/src/components/feats/hotel/HotelCard.tsx +++ b/web/src/components/feats/hotel/HotelCard.tsx @@ -2,6 +2,7 @@ import type { EventName } from '@/lib/events'; import type { Hotel } from '@/lib/hotel-utils'; +import { getHotelImageUrl } from '@/lib/hotel-utils'; import { useHoverTracking } from '@/hooks/useHoverTracking'; import PriceDisplay from '@/components/ui/PriceDisplay'; @@ -47,8 +48,6 @@ export default function HotelCard({ hotel }: { hotel: Hotel }) { window.location.href = `/hotel/products/${hotel.id}`; }; - const imageUrl = `https://images.unsplash.com/photo-1551882547-ff40c63fe5fa?w=400&h=300&fit=crop`; - return (