Vlad Chikalkin 9314cdd1cb
merge branch 'refactor-api' (#23)
* refactor customer api

* refactor slots api

* hooks/customers: use invalidateQueries

* refactor services api

* optimize hooks queryKey

* refactor orders api

* typo refactor hooks

* fix telegramId type (number)

* fix bot with new api

* rename customers masters & clients query

* fix useClientsQuery & useMastersQuery query

* new line after 'use client' & 'use server' directives
2025-05-20 14:27:51 +03:00

24 lines
843 B
TypeScript

import { Container } from '@/components/layout';
import { PageHeader } from '@/components/navigation';
import { ContactDataCard, PersonCard } 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();
return (
<HydrationBoundary state={dehydrate(queryClient)}>
<PageHeader title="Профиль контакта" />
<Container className="px-0">
<PersonCard telegramId={telegramId} />
<ContactDataCard telegramId={telegramId} />
</Container>
</HydrationBoundary>
);
}