diff --git a/apps/web/components/shared/contact-row.tsx b/apps/web/components/shared/contact-row.tsx index afe433b..cd81e63 100644 --- a/apps/web/components/shared/contact-row.tsx +++ b/apps/web/components/shared/contact-row.tsx @@ -1,8 +1,8 @@ -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'; +import { isCustomerMaster } from '@repo/utils/customer'; import Link from 'next/link'; import { memo } from 'react'; @@ -11,8 +11,6 @@ type ContactRowProps = GQL.CustomerFieldsFragment & { }; export const ContactRow = memo(function ({ className, ...contact }: ContactRowProps) { - const isMaster = useIsMaster(); - return (
{contact.name}
-{isMaster ? 'Мастер' : 'Клиент'}
++ {isCustomerMaster(contact) ? 'Мастер' : 'Клиент'} +