fix : label age bovin

This commit is contained in:
2026-05-07 08:46:11 +02:00
parent b932798a87
commit 5b24d642bb

View File

@@ -4,7 +4,7 @@ export const formatAgeLabel = (months: number | null | undefined): string => {
const remaining = months % 12
let label = ''
if (years > 0) label = `${years} an${years > 1 ? 's' : ''}`
if (remaining > 0) label += `${label ? ' ' : ''}${remaining} mois`
if (remaining > 0) label += `${label ? ' ' : ''}${remaining} m`
if (!label) label = '< 1 mois'
return label
}