} label="Главное" />
} label="Записи" />
diff --git a/apps/web/components/navigation/nav-button.tsx b/apps/web/components/navigation/navbar/nav-button.tsx
similarity index 100%
rename from apps/web/components/navigation/nav-button.tsx
rename to apps/web/components/navigation/navbar/nav-button.tsx
diff --git a/apps/web/components/profile/profile-card.tsx b/apps/web/components/profile/profile-card.tsx
index e2b8361..0d33969 100644
--- a/apps/web/components/profile/profile-card.tsx
+++ b/apps/web/components/profile/profile-card.tsx
@@ -5,32 +5,35 @@ import { CheckboxWithText } from '@/components/profile/checkbox-with-text';
import { ProfileField } from '@/components/profile/profile-field';
import { Avatar, AvatarFallback, AvatarImage } from '@repo/ui/components/ui/avatar';
import { Button } from '@repo/ui/components/ui/button';
-import { Card, CardContent, CardHeader } from '@repo/ui/components/ui/card';
+import { Card } from '@repo/ui/components/ui/card';
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
) : (
@@ -74,7 +77,37 @@ export function ProfileCard({ telegramId }: ProfileCardProps) {
) : (
false
)}
-
+
);
}
+
+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 (
+
+ );
+}
diff --git a/packages/ui/src/components/ui/card.tsx b/packages/ui/src/components/ui/card.tsx
index e5b0b1b..8bb58a8 100644
--- a/packages/ui/src/components/ui/card.tsx
+++ b/packages/ui/src/components/ui/card.tsx
@@ -4,7 +4,7 @@ import * as React from 'react';
const Card = React.forwardRef>(
({ className, ...props }, ref) => (
diff --git a/packages/ui/src/globals.css b/packages/ui/src/globals.css
index be31070..f7c0d53 100644
--- a/packages/ui/src/globals.css
+++ b/packages/ui/src/globals.css
@@ -4,6 +4,7 @@
@layer base {
:root {
+ --app-background: 240 4.8% 95.9%;
--background: 0 0% 100%;
--foreground: 240 10% 3.9%;
--card: 0 0% 100%;
@@ -32,6 +33,7 @@
}
.dark {
+ --app-background: 240 3.7% 7%;
--background: 240 10% 3.9%;
--foreground: 0 0% 98%;
--card: 240 10% 3.9%;
diff --git a/packages/ui/tailwind.config.ts b/packages/ui/tailwind.config.ts
index 9821c34..7c11487 100644
--- a/packages/ui/tailwind.config.ts
+++ b/packages/ui/tailwind.config.ts
@@ -35,6 +35,7 @@ const config = {
DEFAULT: 'hsl(var(--accent))',
foreground: 'hsl(var(--accent-foreground))',
},
+ 'app-background': 'hsl(var(--app-background))',
background: 'hsl(var(--background))',
border: 'hsl(var(--border))',
card: {