* 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
24 lines
843 B
TypeScript
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>
|
|
);
|
|
}
|