fix issues
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user