diff --git a/client/src/mobile/screens/dashboard/MDashWidgets.tsx b/client/src/mobile/screens/dashboard/MDashWidgets.tsx index e86db22eb..7b6d5df67 100644 --- a/client/src/mobile/screens/dashboard/MDashWidgets.tsx +++ b/client/src/mobile/screens/dashboard/MDashWidgets.tsx @@ -14,7 +14,7 @@ import { useCollectionLists } from '../../../components/Dashboard/useCollectionL import { shortZone, useDashboardTimezones, zoneOptionLabel } from '../../../components/Dashboard/useDashboardTimezones' import { typeInfo } from '../../../components/Planner/bookings/bookingsModel' import { formatTime, splitReservationDateTime } from '../../../utils/formatters' -import { normalizeAppearance, MOBILE_DASH_TOKENS, type MobileDashToken } from '@trek/shared' +import { compareCodeUnits, normalizeAppearance, MOBILE_DASH_TOKENS, type MobileDashToken } from '@trek/shared' import { MOMENT_LABEL, upcomingKey, type UpcomingReservation } from '../../../pages/dashboard/dashboardModel' import { PLACES_ROOT, placesPath } from '../../../utils/placesRoutes' import MIconBtn from '../../components/MIconBtn' @@ -109,7 +109,7 @@ function MCurrencyWidget() { const { from, to, setFrom, setTo, amount, setAmount, currencies, rate, converted, swap, fetchRates, pairPending, ratePending } = useCurrencyConverter() const ratePendingLabel = pairPending || ratePending const currencyNames = new Intl.DisplayNames(locale, { type: 'currency', fallback: 'none' }) - const options = [...new Set([from, to, ...currencies])].sort().map(value => { + const options = [...new Set([from, to, ...currencies])].sort(compareCodeUnits).map(value => { const name = /^[A-Z]{3}$/.test(value) ? currencyNames.of(value) : undefined return { value, label: name && name !== value ? `${value} ยท ${name}` : value } })