Vlad Chikalkin 7bcae12d54
Some checks failed
Build & Deploy Web & Bot / Build and Push to Docker Hub (push) Has been cancelled
Build & Deploy Web & Bot / Deploy to VPS (push) Has been cancelled
Fix/bugs after first release (#26)
* 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
2025-07-03 16:36:10 +03:00

37 lines
1.2 KiB
TypeScript

import { getCustomer } from '@/actions/api/customers';
import { Container } from '@/components/layout';
import { PageHeader } from '@/components/navigation';
import {
BookContactButton,
ContactDataCard,
PersonCard,
ProfileOrdersList,
} from '@/components/profile';
import { dehydrate, HydrationBoundary, QueryClient } from '@tanstack/react-query';
type Props = { params: Promise<{ telegramId: string }> };
export default async function ProfilePage(props: Readonly<Props>) {
const parameters = await props.params;
const telegramId = Number.parseInt(parameters.telegramId, 10);
const queryClient = new QueryClient();
await queryClient.prefetchQuery({
queryFn: () => getCustomer({ telegramId }),
queryKey: ['customer', telegramId],
});
return (
<HydrationBoundary state={dehydrate(queryClient)}>
<PageHeader title="Профиль контакта" />
<Container className="px-0">
<PersonCard telegramId={telegramId} />
<ContactDataCard telegramId={telegramId} />
<ProfileOrdersList telegramId={telegramId} />
<BookContactButton telegramId={telegramId} />
</Container>
</HydrationBoundary>
);
}