Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 1x | import { TFunction } from '@/shared/@types'
export const displayPriceValues = (t: TFunction, values?: string[]) => {
if (!values) return null
const isAllNull = values?.every(item => item === null || item === '') || !values?.length
if (isAllNull) return null
if (!values?.[1]) {
return t('common:from') + ' ' + values?.[0]
}
if (values?.length === 2 && !values?.[0]) {
return t('common:to') + ' ' + values?.[1]
}
return `${values?.[0]} - ${values?.[1]}`
}
|