wip
This commit is contained in:
@@ -127,7 +127,7 @@ export default function LeagueDetailPage() {
|
||||
const getLeagueScoringConfigUseCase = getGetLeagueScoringConfigUseCase();
|
||||
await getLeagueScoringConfigUseCase.execute({ leagueId });
|
||||
const scoringViewModel = getLeagueScoringConfigUseCase.presenter.getViewModel();
|
||||
setScoringConfig(scoringViewModel);
|
||||
setScoringConfig(scoringViewModel as unknown as LeagueScoringConfigDTO);
|
||||
|
||||
// Load all drivers for standings and map to DTOs for UI components
|
||||
const allDrivers = await driverRepo.findAll();
|
||||
@@ -157,23 +157,23 @@ export default function LeagueDetailPage() {
|
||||
|
||||
if (activeSeason) {
|
||||
const sponsorships = await sponsorshipRepo.findBySeasonId(activeSeason.id);
|
||||
const activeSponsorships = sponsorships.filter(s => s.status === 'active');
|
||||
const activeSponsorships = sponsorships.filter((s) => s.status === 'active');
|
||||
|
||||
const sponsorInfos: SponsorInfo[] = [];
|
||||
for (const sponsorship of activeSponsorships) {
|
||||
const sponsor = await sponsorRepo.findById(sponsorship.sponsorId);
|
||||
if (sponsor) {
|
||||
// Get tagline from demo data if available
|
||||
const demoSponsors = (await import('@gridpilot/testing-support')).sponsors;
|
||||
const demoSponsor = demoSponsors.find((s: any) => s.id === sponsor.id);
|
||||
const testingSupportModule = await import('@gridpilot/testing-support');
|
||||
const demoSponsors = testingSupportModule.sponsors as Array<{ id: string; tagline?: string }>;
|
||||
const demoSponsor = demoSponsors.find((demo) => demo.id === sponsor.id);
|
||||
|
||||
sponsorInfos.push({
|
||||
id: sponsor.id,
|
||||
name: sponsor.name,
|
||||
logoUrl: sponsor.logoUrl,
|
||||
websiteUrl: sponsor.websiteUrl,
|
||||
logoUrl: sponsor.logoUrl ?? '',
|
||||
websiteUrl: sponsor.websiteUrl ?? '',
|
||||
tier: sponsorship.tier,
|
||||
tagline: demoSponsor?.tagline,
|
||||
tagline: demoSponsor?.tagline ?? '',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user