Spaces:
Sleeping
Sleeping
Commit History
-
Fix price filter to work in display currency (e.g. CAD)
The price filter compared the user's input directly against price_usd, but displayed prices are converted to the user's chosen currency. Typing C$187 would not filter out a C$233 flight because its USD price (~$160) was below 187. Now the filter converts max_price from display currency to USD via toUsd() before comparing. Also shows the correct currency symbol in the filter input instead of always "$". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>3253e6d
-
Add currency context and swap formatPrice across all pages
- Add GeolocationResponse, CurrencyRatesResponse, DestinationCard types - Add getGeolocation(), getCurrencyRates(), getPopularDestinations(), getCheapFlights() API functions - Create CurrencyContext with provider, useCurrency hook, localStorage persistence - Wire CurrencyProvider in App.tsx with geolocation-based default currency - Add currency selector dropdown to Header - Replace static formatPrice imports with useCurrency().formatPrice in: FlightCard, SelectedFlightBanner, BookingPage, BookingOptionsPage, ConfirmationPage Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>02df639