website refactor
This commit is contained in:
@@ -17,13 +17,16 @@ interface TeamHeroProps {
|
||||
description?: string;
|
||||
category?: string | null;
|
||||
createdAt?: string;
|
||||
foundedDateLabel?: string;
|
||||
leagues: { id: string }[];
|
||||
};
|
||||
memberCount: number;
|
||||
memberCountLabel?: string;
|
||||
leagueCountLabel?: string;
|
||||
onUpdate: () => void;
|
||||
}
|
||||
|
||||
export function TeamHero({ team, memberCount, onUpdate }: TeamHeroProps) {
|
||||
export function TeamHero({ team, memberCount, memberCountLabel, leagueCountLabel, onUpdate }: TeamHeroProps) {
|
||||
return (
|
||||
<Card>
|
||||
<Group align="start" justify="between" wrap gap={6}>
|
||||
@@ -44,20 +47,20 @@ export function TeamHero({ team, memberCount, onUpdate }: TeamHeroProps) {
|
||||
stats={[
|
||||
{
|
||||
label: 'Personnel',
|
||||
value: `${memberCount} ${memberCount === 1 ? 'member' : 'members'}`,
|
||||
value: memberCountLabel || 'Unknown',
|
||||
},
|
||||
...(team.category ? [{
|
||||
label: 'Category',
|
||||
value: team.category,
|
||||
intent: 'primary' as const,
|
||||
}] : []),
|
||||
...(team.createdAt ? [{
|
||||
...(team.foundedDateLabel ? [{
|
||||
label: 'Founded',
|
||||
value: new Date(team.createdAt).toLocaleDateString('en-US', { month: 'short', year: 'numeric' }),
|
||||
value: team.foundedDateLabel,
|
||||
}] : []),
|
||||
...(team.leagues && team.leagues.length > 0 ? [{
|
||||
label: 'Activity',
|
||||
value: `${team.leagues.length} ${team.leagues.length === 1 ? 'league' : 'leagues'}`,
|
||||
value: leagueCountLabel || 'Unknown',
|
||||
}] : []),
|
||||
]}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user