修正團體管理的 BUG
This commit is contained in:
@@ -453,7 +453,7 @@ export function PopularityRankings() {
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 px-8">
|
||||
{currentTeams.map((team, index) => {
|
||||
const globalRank = startIndex + index + 1
|
||||
const leader = team.members.find((m: any) => m.id === team.leader)
|
||||
const leader = team.members.find((m: any) => m.role === '隊長')
|
||||
|
||||
return (
|
||||
<Card
|
||||
@@ -474,7 +474,7 @@ export function PopularityRankings() {
|
||||
|
||||
<div className="flex-1 min-w-0">
|
||||
<h4 className="font-bold text-gray-900 mb-1 truncate">{team.name}</h4>
|
||||
<p className="text-sm text-gray-600 mb-2">隊長:{leader?.name}</p>
|
||||
<p className="text-sm text-gray-600 mb-2">隊長:{leader?.name || '未知隊長'}</p>
|
||||
<div className="flex flex-wrap gap-1">
|
||||
<Badge variant="outline" className="bg-green-100 text-green-800 border-green-200 text-xs">
|
||||
團隊賽
|
||||
@@ -496,7 +496,13 @@ export function PopularityRankings() {
|
||||
{member.name[0]}
|
||||
</div>
|
||||
<span className="text-gray-600">{member.name}</span>
|
||||
<span className="text-gray-400">({member.role})</span>
|
||||
<span className={`text-xs px-1 py-0.5 rounded ${
|
||||
member.role === '隊長'
|
||||
? 'bg-yellow-100 text-yellow-800'
|
||||
: 'text-gray-400'
|
||||
}`}>
|
||||
{member.role}
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
{team.members.length > 3 && (
|
||||
|
Reference in New Issue
Block a user