website cleanup

This commit is contained in:
2025-12-24 21:44:58 +01:00
parent 9b683a59d3
commit d78854a4c6
277 changed files with 6141 additions and 2693 deletions

View File

@@ -1,4 +1,4 @@
import { PendingRequestDTO } from '@/components/sponsors/PendingSponsorshipRequests';
import type { SponsorshipRequestDTO } from '@/lib/types/generated/SponsorshipRequestDTO';
export class SponsorshipRequestViewModel {
id: string;
@@ -14,17 +14,18 @@ export class SponsorshipRequestViewModel {
platformFee: number;
netAmount: number;
constructor(dto: PendingRequestDTO) {
constructor(dto: SponsorshipRequestDTO) {
this.id = dto.id;
this.sponsorId = dto.sponsorId;
this.sponsorName = dto.sponsorName;
this.sponsorLogo = dto.sponsorLogo;
this.tier = dto.tier;
// Backend currently returns tier as string; normalize to our supported tiers.
this.tier = dto.tier === 'main' ? 'main' : 'secondary';
this.offeredAmount = dto.offeredAmount;
this.currency = dto.currency;
this.formattedAmount = dto.formattedAmount;
this.message = dto.message;
this.createdAt = dto.createdAt;
this.createdAt = new Date(dto.createdAt);
this.platformFee = dto.platformFee;
this.netAmount = dto.netAmount;
}
@@ -51,4 +52,4 @@ export class SponsorshipRequestViewModel {
get tierBadgeVariant(): 'primary' | 'secondary' {
return this.tier === 'main' ? 'primary' : 'secondary';
}
}
}