This commit is contained in:
2025-12-11 21:06:25 +01:00
parent c49ea2598d
commit ec3ddc3a5c
227 changed files with 3496 additions and 2083 deletions

View File

@@ -20,6 +20,7 @@ import {
type LeagueAdminProtestsViewModel,
} from '@/lib/presenters/LeagueAdminPresenter';
import type { LeagueConfigFormModel } from '@gridpilot/racing/application';
import type { LeagueSummaryViewModel } from '@/lib/presenters/LeagueAdminPresenter';
import { LeagueBasicsSection } from './LeagueBasicsSection';
import { LeagueStructureSection } from './LeagueStructureSection';
import { LeagueScoringSection } from './LeagueScoringSection';
@@ -37,13 +38,7 @@ import { AlertTriangle, CheckCircle, Clock, XCircle, Flag, Calendar, User, Dolla
type JoinRequest = LeagueJoinRequestViewModel;
interface LeagueAdminProps {
league: {
id: string;
ownerId: string;
settings: {
pointsSystem: string;
};
};
league: LeagueSummaryViewModel;
onLeagueUpdate?: () => void;
}
@@ -83,7 +78,7 @@ export default function LeagueAdmin({ league, onLeagueUpdate }: LeagueAdminProps
useEffect(() => {
async function loadOwner() {
try {
const summary = await loadLeagueOwnerSummary(league);
const summary = await loadLeagueOwnerSummary({ ownerId: league.ownerId });
setOwnerSummary(summary);
} catch (err) {
console.error('Failed to load league owner:', err);