fix issues

This commit is contained in:
2025-12-26 11:49:20 +01:00
parent d08ec10b40
commit 68ae9da22a
44 changed files with 505 additions and 179 deletions

View File

@@ -23,8 +23,12 @@ export class SponsorshipService {
// Pricing shape isn't finalized in the API yet.
// Keep a predictable, UI-friendly structure until a dedicated DTO is introduced.
const dto = await this.apiClient.getPricing();
const main = dto.pricing.find((p) => p.entityType === 'main')?.price ?? 0;
const secondary = dto.pricing.find((p) => p.entityType === 'secondary')?.price ?? 0;
const main =
dto.pricing.find((p) => p.entityType === 'league' || p.entityType === 'main')?.price ?? 0;
const secondary =
dto.pricing.find((p) => p.entityType === 'driver' || p.entityType === 'secondary')?.price ?? 0;
return new SponsorshipPricingViewModel({
mainSlotPrice: main,
secondarySlotPrice: secondary,