Don't render unecessarily date of birth

This commit is contained in:
Pierre HUBERT 2023-08-11 11:56:51 +02:00
parent 44f54934cc
commit e4ca9f7e9e

View File

@ -33,9 +33,13 @@ export function MemberItem(p: {
{p.member?.dead && <Icon path={mdiCross} size={"1rem"} />}
</>
}
secondary={`${fmtDate(p.member?.dateOfBirth)} - ${fmtDate(
secondary={
p.member?.dead
? `${fmtDate(p.member?.dateOfBirth)} - ${fmtDate(
p.member?.dateOfDeath
)}`}
)}`
: fmtDate(p.member?.dateOfBirth)
}
/>
{p.secondary && (
<ListItemSecondaryAction>{p.secondary}</ListItemSecondaryAction>