a few small fixes

This commit is contained in:
counterweight 2025-12-26 19:00:56 +01:00
parent f6c552cefd
commit 8503c760dc
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
8 changed files with 157 additions and 55 deletions

View file

@ -7,6 +7,7 @@ import { formatTime } from "../../utils/date";
import { formatEur } from "../../utils/exchange";
import { buttonStyles } from "../../styles/shared";
import { useTranslation } from "../../hooks/useTranslation";
import { useLanguage } from "../../hooks/useLanguage";
type BookableSlot = components["schemas"]["BookableSlot"];
type Direction = "buy" | "sell";
@ -156,6 +157,10 @@ export function ConfirmationStep({
onBack,
}: ConfirmationStepProps) {
const t = useTranslation("exchange");
const { locale } = useLanguage();
// Map locale codes to Intl locale strings
const intlLocale = locale === "es" ? "es-ES" : locale === "ca" ? "ca-ES" : "en-US";
return (
<>
{/* Compressed Booking Summary */}
@ -168,7 +173,7 @@ export function ConfirmationStep({
</div>
<div style={styles.compressedBookingDetails}>
<span>
{selectedDate?.toLocaleDateString("es-ES", {
{selectedDate?.toLocaleDateString(intlLocale, {
weekday: "short",
month: "short",
day: "numeric",