view data fixes
Some checks failed
Contract Testing / contract-tests (pull_request) Failing after 7m11s
Contract Testing / contract-snapshot (pull_request) Has been skipped

This commit is contained in:
2026-01-24 23:29:55 +01:00
parent c1750a33dd
commit 1b0a1f4aee
134 changed files with 10380 additions and 415 deletions

View File

@@ -32,14 +32,42 @@ export default async function LeagueLayout({
leagueId,
name: 'Error',
description: 'Failed to load league',
info: { name: 'Error', membersCount: 0, racesCount: 0, avgSOF: 0, structure: '', scoring: '', createdAt: '' },
info: { name: 'Error', description: 'Error', membersCount: 0, racesCount: 0, avgSOF: 0, structure: '', scoring: '', createdAt: '' },
runningRaces: [],
sponsors: [],
ownerSummary: null,
adminSummaries: [],
stewardSummaries: [],
memberSummaries: [],
sponsorInsights: null
sponsorInsights: null,
league: {
id: leagueId,
name: 'Error',
game: 'Unknown',
tier: 'starter',
season: 'Unknown',
description: 'Error',
drivers: 0,
races: 0,
completedRaces: 0,
totalImpressions: 0,
avgViewsPerRace: 0,
engagement: 0,
rating: 0,
seasonStatus: 'completed',
seasonDates: { start: '', end: '' },
sponsorSlots: {
main: { price: 0, status: 'occupied' },
secondary: { price: 0, total: 0, occupied: 0 }
}
},
drivers: [],
races: [],
seasonProgress: { completedRaces: 0, totalRaces: 0, percentage: 0 },
recentResults: [],
walletBalance: 0,
pendingProtestsCount: 0,
pendingJoinRequestsCount: 0
}}
tabs={[]}
>

View File

@@ -22,22 +22,50 @@ export default async function LeagueSettingsPage({ params }: Props) {
}
// For serverError, show the template with empty data
return <LeagueSettingsTemplate viewData={{
leagueId,
league: {
id: leagueId,
name: 'Unknown League',
description: 'League information unavailable',
visibility: 'private',
ownerId: 'unknown',
createdAt: '1970-01-01T00:00:00Z',
updatedAt: '1970-01-01T00:00:00Z',
},
config: {
maxDrivers: 0,
scoringPresetId: 'unknown',
allowLateJoin: false,
requireApproval: false,
basics: {
name: 'Unknown League',
description: 'League information unavailable',
visibility: 'private',
gameId: 'unknown',
},
structure: {
mode: 'solo',
maxDrivers: 0,
},
championships: {
enableDriverChampionship: true,
enableTeamChampionship: false,
enableNationsChampionship: false,
enableTrophyChampionship: false,
},
scoring: {
patternId: 'unknown',
},
dropPolicy: {
strategy: 'none',
},
timings: {},
stewarding: {
decisionMode: 'single_steward',
requireDefense: false,
defenseTimeLimit: 24,
voteTimeLimit: 24,
protestDeadlineHours: 24,
stewardingClosesHours: 48,
notifyAccusedOnProtest: true,
notifyOnVoteRequired: true,
},
},
presets: [],
owner: null,
members: [],
}} />;
}

View File

@@ -29,6 +29,7 @@ export default async function Page({ params }: Props) {
leagueId,
currentDriverId: null,
isAdmin: false,
isTeamChampionship: false,
}}
/>;
}

View File

@@ -33,6 +33,8 @@ export default async function LeagueWalletPage({ params }: Props) {
formattedPendingPayouts: '$0.00',
currency: 'USD',
transactions: [],
totalWithdrawals: 0,
canWithdraw: false,
}} />;
}