diff --git a/apps/web/app/(main)/contacts/page.tsx b/apps/web/app/(main)/contacts/page.tsx index 189951a..f7aa957 100644 --- a/apps/web/app/(main)/contacts/page.tsx +++ b/apps/web/app/(main)/contacts/page.tsx @@ -5,7 +5,7 @@ import { ContactsFilterProvider } from '@/context/contacts-filter'; export default function ContactsPage() { return ( -
+

Контакты

diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index 49adbfd..ce928e2 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -16,7 +16,7 @@ export default async function RootLayout({ children }: Readonly - + diff --git a/apps/web/components/profile/profile-card.tsx b/apps/web/components/profile/profile-card.tsx index 5c8b4b6..5508818 100644 --- a/apps/web/components/profile/profile-card.tsx +++ b/apps/web/components/profile/profile-card.tsx @@ -8,28 +8,31 @@ import { Button } from '@repo/ui/components/ui/button'; import { useQuery } from '@tanstack/react-query'; import Link from 'next/link'; -type ProfileCardProps = { +type ProfileProps = { readonly telegramId?: string; }; -export function ProfileCard({ telegramId }: ProfileCardProps) { +export function ProfileCard(props: ProfileProps) { + return ( +
+ + +
+ ); +} + +export function ProfileFields({ telegramId }: ProfileProps) { const { data: customer } = useQuery({ queryFn: () => getProfile({ telegramId }), queryKey: telegramId ? ['profile', 'telegramId', telegramId] : ['profile'], }); - if (!customer) return
Пользователь не найден
; + if (!customer) return null; return ( -
-
- - - {customer?.name.charAt(0)} - -

{customer?.name}

-
+
+ {telegramId ? false : } {telegramId ? ( false ) : ( @@ -77,3 +80,33 @@ export function ProfileCard({ telegramId }: ProfileCardProps) {
); } + +function Person({ telegramId }: ProfileProps) { + const { data: customer } = useQuery({ + queryFn: () => getProfile({ telegramId }), + queryKey: telegramId ? ['profile', 'telegramId', telegramId] : ['profile'], + }); + + if (!customer) return null; + + return ( +
+
+ + + {customer?.name.charAt(0)} + +

{customer?.name}

+
+
+ ); +} + +function ProfileFieldsHeader() { + return ( +
+

Ваши данные

+
+
+ ); +}