harden media

This commit is contained in:
2025-12-31 15:39:28 +01:00
parent 92226800df
commit 8260bf7baf
413 changed files with 8361 additions and 1544 deletions

View File

@@ -106,7 +106,7 @@ export default function UserPill() {
const dto = await driverService.findById(primaryDriverId);
if (!cancelled) {
setDriver(dto ? new DriverViewModelClass(dto) : null);
setDriver(dto ? new DriverViewModelClass({ ...dto, avatarUrl: (dto as any).avatarUrl ?? null }) : null);
}
}
@@ -127,7 +127,7 @@ export default function UserPill() {
const rating: number | null = null;
const rank: number | null = null;
const avatarSrc = mediaService.getDriverAvatar(primaryDriverId);
const avatarSrc = driver.avatarUrl;
return {
driver,
@@ -135,7 +135,7 @@ export default function UserPill() {
rating,
rank,
};
}, [session, driver, primaryDriverId, mediaService]);
}, [session, driver, primaryDriverId]);
// Close menu when clicking outside
useEffect(() => {