more imporvmentes

This commit is contained in:
yohlo
2025-10-11 00:33:27 -05:00
parent 6a7d119d3e
commit 127709bb6c

View File

@@ -22,12 +22,21 @@ const TeamListItem = React.memo(({ team }: TeamListItemProps) => {
[team.players] [team.players]
); );
const teamNameSize = useMemo(() => {
const nameLength = team.name.length;
if (nameLength > 20) return 'xs';
if (nameLength > 15) return 'sm';
return 'md';
}, [team.name]);
return ( return (
<Group justify="space-between" w="100%"> <Group justify="space-between" w="100%" wrap="nowrap">
<Text fw={500}>{`${team.name}`}</Text> <Text fw={500} size={teamNameSize} style={{ flexShrink: 1, minWidth: 0, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>
<Stack ml="auto" gap={0}> {`${team.name}`}
{playerNames.map((name) => ( </Text>
<Text size="xs" c="dimmed" ta="right"> <Stack ml="auto" gap={0} style={{ flexShrink: 0 }}>
{playerNames.map((name, idx) => (
<Text key={idx} size="xs" c="dimmed" ta="right">
{name} {name}
</Text> </Text>
))} ))}