diff --git a/src/features/teams/components/team-list.tsx b/src/features/teams/components/team-list.tsx index e119301..0812a84 100644 --- a/src/features/teams/components/team-list.tsx +++ b/src/features/teams/components/team-list.tsx @@ -22,12 +22,21 @@ const TeamListItem = React.memo(({ team }: TeamListItemProps) => { [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 ( - - {`${team.name}`} - - {playerNames.map((name) => ( - + + + {`${team.name}`} + + + {playerNames.map((name, idx) => ( + {name} ))}