* web/packages: upgrade next * fix(api/orders): update master validation logic to handle optional masters * fix(api/notify, api/orders): enhance notification messages and update order state handling for masters * fix react typings * refactor(order-buttons, action-panel): streamline button handlers and add return functionality * fix(contacts, orders): replace empty state messages with DataNotFound component for better user feedback * feat(bot): add share bot command and update environment configuration for BOT_URL * fix: pnpm-lock.yaml * feat(bot): implement add contact wizard scene and enhance contact handling logic * feat(profile): add BookContactButton component to enhance booking functionality * fix(order-buttons): update cancel and confirm button logic based on order state * feat(service-select): share services list for all enhance service card display with duration formatting and improve layout
23 lines
641 B
TypeScript
23 lines
641 B
TypeScript
'use client';
|
|
|
|
import { DataNotFound } from '../shared/alert';
|
|
import { ContactRow } from '../shared/contact-row';
|
|
import { useCustomerContacts } from '@/hooks/api/contacts';
|
|
import { LoadingSpinner } from '@repo/ui/components/ui/spinner';
|
|
|
|
export function ContactsList() {
|
|
const { contacts, isLoading } = useCustomerContacts();
|
|
|
|
if (isLoading) return <LoadingSpinner />;
|
|
|
|
if (!contacts.length) return <DataNotFound title="Контакты не найдены" />;
|
|
|
|
return (
|
|
<div className="space-y-2">
|
|
{contacts.map((contact) => (
|
|
<ContactRow key={contact.documentId} {...contact} />
|
|
))}
|
|
</div>
|
|
);
|
|
}
|