website refactor
This commit is contained in:
@@ -41,7 +41,7 @@ export class DriverService {
|
||||
if (!dto) {
|
||||
return null;
|
||||
}
|
||||
return new DriverViewModel({ ...dto, avatarUrl: (dto as any).avatarUrl ?? null });
|
||||
return new DriverViewModel({ ...dto, avatarUrl: dto.avatarUrl ?? null });
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -113,7 +113,7 @@ export class DriverService {
|
||||
extendedProfile: dto.extendedProfile
|
||||
? {
|
||||
socialHandles: dto.extendedProfile.socialHandles.map((h) => ({
|
||||
platform: h.platform as any,
|
||||
platform: h.platform as 'twitter' | 'youtube' | 'twitch' | 'discord',
|
||||
handle: h.handle,
|
||||
url: h.url,
|
||||
})),
|
||||
@@ -121,8 +121,8 @@ export class DriverService {
|
||||
id: a.id,
|
||||
title: a.title,
|
||||
description: a.description,
|
||||
icon: a.icon as any,
|
||||
rarity: a.rarity as any,
|
||||
icon: a.icon as 'trophy' | 'medal' | 'star' | 'crown' | 'target' | 'zap',
|
||||
rarity: a.rarity as 'common' | 'rare' | 'epic' | 'legendary',
|
||||
earnedAt: a.earnedAt,
|
||||
})),
|
||||
racingStyle: dto.extendedProfile.racingStyle,
|
||||
|
||||
Reference in New Issue
Block a user