import {useLocalFormat} from '@vendure/dashboard';
// ...
// Intl API formatting tools
const {
formatCurrency,
formatNumber,
formatDate,
formatRelativeDate,
formatLanguageName,
formatRegionName,
formatCurrencyName,
toMajorUnits,
toMinorUnits,
} = useLocalFormat();
formatCurrency(value: number, currency: string, precision?: number)
formatCurrencyName(currencyCode: string, display: 'full' | 'symbol' | 'name' = 'full')
formatNumber(value: number) // human-readable
formatDate(value: string | Date, options?: Intl.DateTimeFormatOptions)
formatRelativeDate(value: string | Date, options?: Intl.RelativeTimeFormatOptions)
Example link destinations:
Important: when linking to detail pages, prefer the DetailPageButton. If not in a table column,
add className='border'.