diff --git a/apps/web/components/shared/contact-row.tsx b/apps/web/components/shared/contact-row.tsx index d2a462a..afe433b 100644 --- a/apps/web/components/shared/contact-row.tsx +++ b/apps/web/components/shared/contact-row.tsx @@ -1,4 +1,5 @@ -import * as GQL from '@repo/graphql/types'; +import { useIsMaster } from '@/hooks/api/customers'; +import type * as GQL from '@repo/graphql/types'; import { Avatar, AvatarFallback, AvatarImage } from '@repo/ui/components/ui/avatar'; import { Badge } from '@repo/ui/components/ui/badge'; import { cn } from '@repo/ui/lib/utils'; @@ -10,6 +11,8 @@ type ContactRowProps = GQL.CustomerFieldsFragment & { }; export const ContactRow = memo(function ({ className, ...contact }: ContactRowProps) { + const isMaster = useIsMaster(); + return (

{contact.name}

-

- {contact.role === GQL.Enum_Customer_Role.Client ? 'Клиент' : 'Мастер'} -

+

{isMaster ? 'Мастер' : 'Клиент'}

{contact.active ?
: Неактивен}