2025-06-23 20:15:19 +03:00

31 lines
893 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

'use client';
import { ContactRow } from '../shared/contact-row';
import { type OrderComponentProps } from './types';
import { useOrderQuery } from '@/hooks/api/orders';
export function OrderContacts({ documentId }: Readonly<OrderComponentProps>) {
const { data: { order } = {} } = useOrderQuery({ documentId });
if (!order) return null;
return (
<div className="flex flex-col space-y-2">
<h1 className="font-bold">Контакты</h1>
<div className="space-y-2">
{order.slot?.master && (
<ContactRow
className="rounded-2xl bg-background p-2 px-4 dark:bg-primary/5"
{...order.slot?.master}
/>
)}
{order.client && (
<ContactRow
className="rounded-2xl bg-background p-2 px-4 dark:bg-primary/5"
{...order.client}
/>
)}
</div>
</div>
);
}