a few small fixes
This commit is contained in:
parent
f6c552cefd
commit
8503c760dc
8 changed files with 157 additions and 55 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue