harden media
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user