website refactor
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import Link from 'next/link';
|
||||
import { Link } from '@/ui/Link';
|
||||
import { PlaceholderImage } from '@/ui/PlaceholderImage';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Text } from '@/ui/Text';
|
||||
@@ -35,7 +35,8 @@ export function DriverIdentity(props: DriverIdentityProps) {
|
||||
alignItems="center"
|
||||
justifyContent="center"
|
||||
flexShrink={0}
|
||||
style={{ width: avatarSize, height: avatarSize }}
|
||||
w={`${avatarSize}px`}
|
||||
h={`${avatarSize}px`}
|
||||
>
|
||||
{avatarUrl ? (
|
||||
<Image
|
||||
@@ -54,17 +55,17 @@ export function DriverIdentity(props: DriverIdentityProps) {
|
||||
|
||||
<Box flexGrow={1} minWidth="0">
|
||||
<Box display="flex" alignItems="center" gap={2} minWidth="0">
|
||||
<Text size={nameSize} weight="medium" color="text-white" className="truncate">
|
||||
<Text size={nameSize} weight="medium" color="text-white" truncate>
|
||||
{driver.name}
|
||||
</Text>
|
||||
{contextLabel && (
|
||||
<Badge variant="default" className="bg-charcoal-outline/60 text-[10px] md:text-xs">
|
||||
<Badge variant="default" bg="bg-charcoal-outline/60" size="xs">
|
||||
{contextLabel}
|
||||
</Badge>
|
||||
)}
|
||||
</Box>
|
||||
{meta && (
|
||||
<Text size="xs" color="text-gray-400" mt={0.5} className="truncate" block>
|
||||
<Text size="xs" color="text-gray-400" mt={0.5} truncate block>
|
||||
{meta}
|
||||
</Text>
|
||||
)}
|
||||
@@ -74,7 +75,7 @@ export function DriverIdentity(props: DriverIdentityProps) {
|
||||
|
||||
if (href) {
|
||||
return (
|
||||
<Link href={href} className="flex items-center gap-3 md:gap-4 flex-1 min-w-0">
|
||||
<Link href={href} block variant="ghost">
|
||||
{content}
|
||||
</Link>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user