From 4e5fd308c7d3dc3b5d862458fb5fb958a6fae135 Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Wed, 16 Jul 2025 17:05:32 +0300 Subject: [PATCH] fix(contact-row): replace useIsMaster hook with isCustomerMaster utility for role display logic --- apps/web/components/shared/contact-row.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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) ? 'Мастер' : 'Клиент'} +

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