vchikalkin 4139aa918d fix(avatar): update UserAvatar sizes for consistency across components
- Changed UserAvatar size from 'xl' to 'lg' in PersonCard for better alignment with design.
- Adjusted UserAvatar size from 'sm' to 'xs' in OrderCard to ensure uniformity in avatar presentation.
- Updated sizeClasses in UserAvatar component to reflect the new 'xs' size, enhancing responsiveness.
2025-09-10 17:30:40 +03:00

30 lines
858 B
TypeScript

'use client';
import { type ProfileProps } from './types';
import { UserAvatar } from '@/components/shared/user-avatar';
import { useCustomerQuery } from '@/hooks/api/customers';
import { Card } from '@repo/ui/components/ui/card';
import { LoadingSpinner } from '@repo/ui/components/ui/spinner';
export function PersonCard({ telegramId }: Readonly<ProfileProps>) {
const { data: { customer } = {}, isLoading } = useCustomerQuery({ telegramId });
if (isLoading)
return (
<div className="p-4">
<LoadingSpinner />
</div>
);
if (!customer) return null;
return (
<Card className="bg-transparent p-4 shadow-none">
<div className="flex flex-col items-center space-y-2">
<UserAvatar {...customer} size="lg" />
<h2 className="text-2xl font-bold">{customer?.name}</h2>
</div>
</Card>
);
}