website refactor
This commit is contained in:
21
apps/website/lib/view-models/SponsorDashboardViewModel.ts
Normal file
21
apps/website/lib/view-models/SponsorDashboardViewModel.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { SponsorDashboardDTO } from '@/lib/types/generated/SponsorDashboardDTO';
|
||||
|
||||
/**
|
||||
* Sponsor Dashboard View Model
|
||||
*
|
||||
* Represents dashboard data for a sponsor with UI-specific transformations.
|
||||
*/
|
||||
export class SponsorDashboardViewModel {
|
||||
sponsorId: string;
|
||||
sponsorName: string;
|
||||
|
||||
constructor(dto: SponsorDashboardDTO) {
|
||||
this.sponsorId = dto.sponsorId;
|
||||
this.sponsorName = dto.sponsorName;
|
||||
}
|
||||
|
||||
/** UI-specific: Welcome message */
|
||||
get welcomeMessage(): string {
|
||||
return `Welcome back, ${this.sponsorName}!`;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user