This commit is contained in:
2025-12-10 12:38:55 +01:00
parent 0f7fe67d3c
commit fbbcf414a4
87 changed files with 11972 additions and 390 deletions

View File

@@ -65,361 +65,6 @@ interface Category {
// DEMO LEAGUES DATA
// ============================================================================
const DEMO_LEAGUES: LeagueSummaryDTO[] = [
// Driver Championships
{
id: 'demo-1',
name: 'iRacing GT3 Pro Series',
description: 'Elite GT3 competition for serious sim racers. Weekly races on iconic tracks with professional stewarding and live commentary.',
createdAt: new Date(Date.now() - 2 * 24 * 60 * 60 * 1000), // 2 days ago
ownerId: 'owner-1',
maxDrivers: 32,
usedDriverSlots: 28,
structureSummary: 'Solo • 32 drivers',
scoringPatternSummary: 'Sprint + Main • Best 8 of 10',
timingSummary: '20 min Quali • 45 min Race',
scoring: {
gameId: 'iracing',
gameName: 'iRacing',
primaryChampionshipType: 'driver',
scoringPresetId: 'sprint-main-driver',
scoringPresetName: 'Sprint + Main (Driver)',
dropPolicySummary: 'Best 8 of 10',
scoringPatternSummary: 'Sprint + Main • Best 8 of 10',
},
},
{
id: 'demo-2',
name: 'iRacing IMSA Championship',
description: 'Race across continents in the most prestigious GT championship. Professional-grade competition with real-world rules.',
createdAt: new Date(Date.now() - 5 * 24 * 60 * 60 * 1000),
ownerId: 'owner-2',
maxDrivers: 40,
usedDriverSlots: 35,
structureSummary: 'Solo • 40 drivers',
scoringPatternSummary: 'Feature Race • Best 6 of 8',
timingSummary: '30 min Quali • 60 min Race',
scoring: {
gameId: 'iracing',
gameName: 'iRacing',
primaryChampionshipType: 'driver',
scoringPresetId: 'feature-driver',
scoringPresetName: 'Feature Race (Driver)',
dropPolicySummary: 'Best 6 of 8',
scoringPatternSummary: 'Feature Race • Best 6 of 8',
},
},
{
id: 'demo-3',
name: 'iRacing Formula Championship',
description: 'The ultimate open-wheel experience. Full calendar, realistic regulations, and championship-level competition.',
createdAt: new Date(Date.now() - 1 * 24 * 60 * 60 * 1000), // Yesterday
ownerId: 'owner-3',
maxDrivers: 20,
usedDriverSlots: 20,
structureSummary: 'Solo • 20 drivers',
scoringPatternSummary: 'Sprint + Feature • All rounds count',
timingSummary: '18 min Quali • 50% Race',
scoring: {
gameId: 'iracing',
gameName: 'iRacing',
primaryChampionshipType: 'driver',
scoringPresetId: 'sprint-feature-driver',
scoringPresetName: 'Sprint + Feature (Driver)',
dropPolicySummary: 'All rounds count',
scoringPatternSummary: 'Sprint + Feature • All rounds count',
},
},
// Team Championships
{
id: 'demo-4',
name: 'Le Mans Virtual Series',
description: 'Endurance racing at its finest. Multi-class prototype and GT competition with team strategy at the core.',
createdAt: new Date(Date.now() - 3 * 24 * 60 * 60 * 1000),
ownerId: 'owner-4',
maxDrivers: 48,
usedDriverSlots: 42,
maxTeams: 16,
usedTeamSlots: 14,
structureSummary: 'Teams • 16 × 3 drivers',
scoringPatternSummary: 'Endurance • Best 4 of 6',
timingSummary: '30 min Quali • 6h Race',
scoring: {
gameId: 'iracing',
gameName: 'iRacing',
primaryChampionshipType: 'team',
scoringPresetId: 'endurance-team',
scoringPresetName: 'Endurance (Team)',
dropPolicySummary: 'Best 4 of 6',
scoringPatternSummary: 'Endurance • Best 4 of 6',
},
},
{
id: 'demo-5',
name: 'iRacing British GT Teams',
description: 'British GT-style team championship. Pro-Am format with driver ratings and team strategy.',
createdAt: new Date(Date.now() - 10 * 24 * 60 * 60 * 1000),
ownerId: 'owner-5',
maxDrivers: 40,
usedDriverSlots: 32,
maxTeams: 20,
usedTeamSlots: 16,
structureSummary: 'Teams • 20 × 2 drivers',
scoringPatternSummary: 'Sprint + Main • Best 8 of 10',
timingSummary: '15 min Quali • 60 min Race',
scoring: {
gameId: 'iracing',
gameName: 'iRacing',
primaryChampionshipType: 'team',
scoringPresetId: 'sprint-main-team',
scoringPresetName: 'Sprint + Main (Team)',
dropPolicySummary: 'Best 8 of 10',
scoringPatternSummary: 'Sprint + Main • Best 8 of 10',
},
},
// Nations Cup
{
id: 'demo-6',
name: 'FIA Nations Cup iRacing',
description: 'Represent your nation in this prestigious international competition. Pride, glory, and national anthems.',
createdAt: new Date(Date.now() - 4 * 24 * 60 * 60 * 1000),
ownerId: 'owner-6',
maxDrivers: 50,
usedDriverSlots: 45,
structureSummary: 'Nations • 50 drivers',
scoringPatternSummary: 'Feature Race • All rounds count',
timingSummary: '20 min Quali • 40 min Race',
scoring: {
gameId: 'iracing',
gameName: 'iRacing',
primaryChampionshipType: 'nations',
scoringPresetId: 'feature-nations',
scoringPresetName: 'Feature Race (Nations)',
dropPolicySummary: 'All rounds count',
scoringPatternSummary: 'Feature Race • All rounds count',
},
},
{
id: 'demo-7',
name: 'European Nations GT Cup',
description: 'The best European nations battle it out in GT3 machinery. Honor your flag.',
createdAt: new Date(Date.now() - 6 * 24 * 60 * 60 * 1000),
ownerId: 'owner-7',
maxDrivers: 30,
usedDriverSlots: 24,
structureSummary: 'Nations • 30 drivers',
scoringPatternSummary: 'Sprint + Main • Best 6 of 8',
timingSummary: '15 min Quali • 45 min Race',
scoring: {
gameId: 'iracing',
gameName: 'iRacing',
primaryChampionshipType: 'nations',
scoringPresetId: 'sprint-main-nations',
scoringPresetName: 'Sprint + Main (Nations)',
dropPolicySummary: 'Best 6 of 8',
scoringPatternSummary: 'Sprint + Main • Best 6 of 8',
},
},
// Trophy Series
{
id: 'demo-8',
name: 'Rookie Trophy Challenge',
description: 'Perfect for newcomers! Learn the ropes of competitive racing in a supportive environment.',
createdAt: new Date(Date.now() - 1 * 24 * 60 * 60 * 1000), // Yesterday
ownerId: 'owner-8',
maxDrivers: 24,
usedDriverSlots: 18,
structureSummary: 'Solo • 24 drivers',
scoringPatternSummary: 'Feature Race • Best 8 of 10',
timingSummary: '10 min Quali • 20 min Race',
scoring: {
gameId: 'iracing',
gameName: 'iRacing',
primaryChampionshipType: 'trophy',
scoringPresetId: 'feature-trophy',
scoringPresetName: 'Feature Race (Trophy)',
dropPolicySummary: 'Best 8 of 10',
scoringPatternSummary: 'Feature Race • Best 8 of 10',
},
},
{
id: 'demo-9',
name: 'Porsche Cup Masters',
description: 'One-make series featuring the iconic Porsche 911 GT3 Cup. Pure driving skill determines the winner.',
createdAt: new Date(Date.now() - 8 * 24 * 60 * 60 * 1000),
ownerId: 'owner-9',
maxDrivers: 28,
usedDriverSlots: 26,
structureSummary: 'Solo • 28 drivers',
scoringPatternSummary: 'Sprint + Main • Best 10 of 12',
timingSummary: '15 min Quali • 30 min Race',
scoring: {
gameId: 'iracing',
gameName: 'iRacing',
primaryChampionshipType: 'trophy',
scoringPresetId: 'sprint-main-trophy',
scoringPresetName: 'Sprint + Main (Trophy)',
dropPolicySummary: 'Best 10 of 12',
scoringPatternSummary: 'Sprint + Main • Best 10 of 12',
},
},
// More variety - Recently Added
{
id: 'demo-10',
name: 'GT World Challenge Sprint',
description: 'Fast-paced sprint racing in GT3 machinery. Short, intense races that reward consistency.',
createdAt: new Date(Date.now() - 12 * 60 * 60 * 1000), // 12 hours ago
ownerId: 'owner-10',
maxDrivers: 36,
usedDriverSlots: 12,
structureSummary: 'Solo • 36 drivers',
scoringPatternSummary: 'Sprint Format • Best 8 of 10',
timingSummary: '10 min Quali • 25 min Race',
scoring: {
gameId: 'iracing',
gameName: 'iRacing',
primaryChampionshipType: 'driver',
scoringPresetId: 'sprint-driver',
scoringPresetName: 'Sprint (Driver)',
dropPolicySummary: 'Best 8 of 10',
scoringPatternSummary: 'Sprint Format • Best 8 of 10',
},
},
{
id: 'demo-11',
name: 'Nürburgring 24h League',
description: 'The ultimate test of endurance. Teams battle through day and night at the legendary Nordschleife.',
createdAt: new Date(Date.now() - 6 * 60 * 60 * 1000), // 6 hours ago
ownerId: 'owner-11',
maxDrivers: 60,
usedDriverSlots: 8,
maxTeams: 20,
usedTeamSlots: 4,
structureSummary: 'Teams • 20 × 3 drivers',
scoringPatternSummary: 'Endurance • All races count',
timingSummary: '45 min Quali • 24h Race',
scoring: {
gameId: 'iracing',
gameName: 'iRacing',
primaryChampionshipType: 'team',
scoringPresetId: 'endurance-team',
scoringPresetName: 'Endurance (Team)',
dropPolicySummary: 'All races count',
scoringPatternSummary: 'Endurance • All races count',
},
},
{
id: 'demo-12',
name: 'iRacing Constructors Battle',
description: 'Team-based championship. Coordinate with your teammate to maximize constructor points.',
createdAt: new Date(Date.now() - 2 * 60 * 60 * 1000), // 2 hours ago
ownerId: 'owner-12',
maxDrivers: 20,
usedDriverSlots: 6,
maxTeams: 10,
usedTeamSlots: 3,
structureSummary: 'Teams • 10 × 2 drivers',
scoringPatternSummary: 'Full Season • All rounds count',
timingSummary: '18 min Quali • 60 min Race',
scoring: {
gameId: 'iracing',
gameName: 'iRacing',
primaryChampionshipType: 'team',
scoringPresetId: 'full-season-team',
scoringPresetName: 'Full Season (Team)',
dropPolicySummary: 'All rounds count',
scoringPatternSummary: 'Full Season • All rounds count',
},
},
// Additional popular leagues
{
id: 'demo-13',
name: 'VRS GT Endurance Series',
description: 'Multi-class endurance racing with LMP2 and GT3. Strategic pit stops and driver changes required.',
createdAt: new Date(Date.now() - 14 * 24 * 60 * 60 * 1000),
ownerId: 'owner-13',
maxDrivers: 54,
usedDriverSlots: 51,
maxTeams: 18,
usedTeamSlots: 17,
structureSummary: 'Teams • 18 × 3 drivers',
scoringPatternSummary: 'Endurance • Best 5 of 6',
timingSummary: '30 min Quali • 4h Race',
scoring: {
gameId: 'iracing',
gameName: 'iRacing',
primaryChampionshipType: 'team',
scoringPresetId: 'endurance-team',
scoringPresetName: 'Endurance (Team)',
dropPolicySummary: 'Best 5 of 6',
scoringPatternSummary: 'Endurance • Best 5 of 6',
},
},
{
id: 'demo-14',
name: 'Ferrari Challenge Series',
description: 'One-make Ferrari 488 Challenge championship. Italian passion meets precision racing.',
createdAt: new Date(Date.now() - 20 * 24 * 60 * 60 * 1000),
ownerId: 'owner-14',
maxDrivers: 24,
usedDriverSlots: 22,
structureSummary: 'Solo • 24 drivers',
scoringPatternSummary: 'Sprint + Main • Best 10 of 12',
timingSummary: '15 min Quali • 35 min Race',
scoring: {
gameId: 'iracing',
gameName: 'iRacing',
primaryChampionshipType: 'trophy',
scoringPresetId: 'sprint-main-trophy',
scoringPresetName: 'Sprint + Main (Trophy)',
dropPolicySummary: 'Best 10 of 12',
scoringPatternSummary: 'Sprint + Main • Best 10 of 12',
},
},
{
id: 'demo-15',
name: 'Oceania Nations Cup',
description: 'Australia and New Zealand battle for Pacific supremacy in this regional nations championship.',
createdAt: new Date(Date.now() - 3 * 24 * 60 * 60 * 1000),
ownerId: 'owner-15',
maxDrivers: 20,
usedDriverSlots: 15,
structureSummary: 'Nations • 20 drivers',
scoringPatternSummary: 'Feature Race • Best 6 of 8',
timingSummary: '15 min Quali • 45 min Race',
scoring: {
gameId: 'iracing',
gameName: 'iRacing',
primaryChampionshipType: 'nations',
scoringPresetId: 'feature-nations',
scoringPresetName: 'Feature Race (Nations)',
dropPolicySummary: 'Best 6 of 8',
scoringPatternSummary: 'Feature Race • Best 6 of 8',
},
},
{
id: 'demo-16',
name: 'iRacing Sprint Series',
description: 'Quick 20-minute races for drivers with limited time. Maximum action, minimum commitment.',
createdAt: new Date(Date.now() - 18 * 60 * 60 * 1000), // 18 hours ago
ownerId: 'owner-16',
maxDrivers: 28,
usedDriverSlots: 14,
structureSummary: 'Solo • 28 drivers',
scoringPatternSummary: 'Sprint Only • All races count',
timingSummary: '8 min Quali • 20 min Race',
scoring: {
gameId: 'iracing',
gameName: 'iRacing',
primaryChampionshipType: 'driver',
scoringPresetId: 'sprint-driver',
scoringPresetName: 'Sprint (Driver)',
dropPolicySummary: 'All races count',
scoringPatternSummary: 'Sprint Only • All races count',
},
},
];
// ============================================================================
// CATEGORIES
// ============================================================================
@@ -754,14 +399,11 @@ export default function LeaguesPage() {
}
};
// Combine real leagues with demo leagues
const leagues = [...realLeagues, ...DEMO_LEAGUES];
// Use only real leagues from repository
const leagues = realLeagues;
const handleLeagueClick = (leagueId: string) => {
// Don't navigate for demo leagues
if (leagueId.startsWith('demo-')) {
return;
}
// Navigate to league - all leagues are clickable
router.push(`/leagues/${leagueId}`);
};