website cleanup
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import Link from 'next/link';
|
||||
import Image from 'next/image';
|
||||
import type { DriverDTO } from '@/lib/types/generated/DriverDTO';
|
||||
import type { DriverViewModel } from '@/lib/view-models/DriverViewModel';
|
||||
|
||||
export interface DriverIdentityProps {
|
||||
driver: DriverDTO;
|
||||
driver: DriverViewModel;
|
||||
href?: string;
|
||||
contextLabel?: React.ReactNode;
|
||||
meta?: React.ReactNode;
|
||||
@@ -21,6 +21,9 @@ export default function DriverIdentity(props: DriverIdentityProps) {
|
||||
|
||||
const metaTextClasses = 'text-xs md:text-sm text-gray-400';
|
||||
|
||||
// Use provided avatar URL or fallback to default avatar path
|
||||
const avatarUrl = driver.avatarUrl || `/api/media/avatar/${driver.id}`;
|
||||
|
||||
const content = (
|
||||
<div className="flex items-center gap-3 md:gap-4 flex-1 min-w-0">
|
||||
<div
|
||||
@@ -28,7 +31,7 @@ export default function DriverIdentity(props: DriverIdentityProps) {
|
||||
style={{ width: avatarSize, height: avatarSize }}
|
||||
>
|
||||
<Image
|
||||
src={getImageService().getDriverAvatar(driver.id)}
|
||||
src={avatarUrl}
|
||||
alt={driver.name}
|
||||
width={avatarSize}
|
||||
height={avatarSize}
|
||||
|
||||
Reference in New Issue
Block a user