website refactor
This commit is contained in:
@@ -1,19 +1,10 @@
|
||||
import React from 'react';
|
||||
import { getMediaUrl } from '@/lib/utilities/media';
|
||||
import { TeamLeaderboardPreview as SemanticTeamLeaderboardPreview } from '@/components/leaderboards/TeamLeaderboardPreview';
|
||||
import type { LeaderboardTeamItem } from '@/lib/view-data/LeaderboardTeamItem';
|
||||
|
||||
interface TeamLeaderboardPreviewProps {
|
||||
topTeams: Array<{
|
||||
id: string;
|
||||
name: string;
|
||||
logoUrl?: string;
|
||||
category?: string;
|
||||
memberCount: number;
|
||||
totalWins: number;
|
||||
isRecruiting: boolean;
|
||||
rating?: number;
|
||||
performanceLevel: string;
|
||||
}>;
|
||||
topTeams: LeaderboardTeamItem[];
|
||||
onTeamClick: (id: string) => void;
|
||||
onViewFullLeaderboard: () => void;
|
||||
}
|
||||
@@ -27,15 +18,17 @@ export function TeamLeaderboardPreview({
|
||||
|
||||
return (
|
||||
<SemanticTeamLeaderboardPreview
|
||||
teams={topTeams.map((team, index) => ({
|
||||
teams={topTeams.map((team) => ({
|
||||
id: team.id,
|
||||
name: team.name,
|
||||
tag: '', // Not available in this view data
|
||||
tag: team.tag,
|
||||
memberCount: team.memberCount,
|
||||
category: team.category,
|
||||
totalWins: team.totalWins,
|
||||
logoUrl: team.logoUrl || getMediaUrl('team-logo', team.id),
|
||||
position: index + 1
|
||||
position: team.position,
|
||||
rating: team.rating,
|
||||
performanceLevel: team.performanceLevel
|
||||
}))}
|
||||
onTeamClick={onTeamClick}
|
||||
onNavigateToTeams={onViewFullLeaderboard}
|
||||
|
||||
Reference in New Issue
Block a user