From ef391a00e8d3950f1e8370e6dc14d0da3b5dc705 Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Tue, 11 Feb 2025 18:36:41 +0300 Subject: [PATCH] use Container in pages --- apps/web/app/(main)/profile/[telegramId]/page.tsx | 5 +++-- apps/web/app/(main)/profile/page.tsx | 5 +++-- apps/web/app/(main)/profile/schedule/page.tsx | 11 +++++++---- apps/web/components/layout/container.tsx | 8 ++++++-- .../schedule/time-slots/components/add-slot-form.tsx | 2 +- .../schedule/time-slots/components/slots-list.tsx | 4 ++-- 6 files changed, 22 insertions(+), 13 deletions(-) diff --git a/apps/web/app/(main)/profile/[telegramId]/page.tsx b/apps/web/app/(main)/profile/[telegramId]/page.tsx index c8bc6a1..3f6e7b6 100644 --- a/apps/web/app/(main)/profile/[telegramId]/page.tsx +++ b/apps/web/app/(main)/profile/[telegramId]/page.tsx @@ -1,4 +1,5 @@ import { getProfile } from '@/actions/profile'; +import { Container } from '@/components/layout'; import { PageHeader } from '@/components/navigation'; import { ContactDataCard, PersonCard } from '@/components/profile'; import { dehydrate, HydrationBoundary, QueryClient } from '@tanstack/react-query'; @@ -19,10 +20,10 @@ export default async function ProfilePage(props: Readonly) { return ( -
+ -
+
); } diff --git a/apps/web/app/(main)/profile/page.tsx b/apps/web/app/(main)/profile/page.tsx index 15ef539..68a88dd 100644 --- a/apps/web/app/(main)/profile/page.tsx +++ b/apps/web/app/(main)/profile/page.tsx @@ -1,4 +1,5 @@ import { getProfile } from '@/actions/profile'; +import { Container } from '@/components/layout'; import { LinksCard, PersonCard, ProfileDataCard } from '@/components/profile'; import { dehydrate, HydrationBoundary, QueryClient } from '@tanstack/react-query'; @@ -12,11 +13,11 @@ export default async function ProfilePage() { return ( -
+ -
+
); } diff --git a/apps/web/app/(main)/profile/schedule/page.tsx b/apps/web/app/(main)/profile/schedule/page.tsx index 98a518c..e5c85af 100644 --- a/apps/web/app/(main)/profile/schedule/page.tsx +++ b/apps/web/app/(main)/profile/schedule/page.tsx @@ -1,4 +1,5 @@ import { HorizontalDivider } from '@/components/common/divider'; +import { Container } from '@/components/layout'; import { PageHeader } from '@/components/navigation'; import { AddSlotForm, SlotsCalendar, SlotsList } from '@/components/schedule'; import { ScheduleSlotsProvider } from '@/context/schedule-slots'; @@ -7,10 +8,12 @@ export default function SchedulePage() { return ( - - - - + + + + + + ); } diff --git a/apps/web/components/layout/container.tsx b/apps/web/components/layout/container.tsx index 5617a63..34834bf 100644 --- a/apps/web/components/layout/container.tsx +++ b/apps/web/components/layout/container.tsx @@ -1,5 +1,9 @@ +import { cn } from '@repo/ui/lib/utils'; import { type PropsWithChildren } from 'react'; -export function Container({ children }: Readonly) { - return
{children}
; +export function Container({ + children, + className, +}: Readonly & { readonly className?: string }) { + return
{children}
; } diff --git a/apps/web/components/schedule/time-slots/components/add-slot-form.tsx b/apps/web/components/schedule/time-slots/components/add-slot-form.tsx index 230ca7e..cb6f127 100644 --- a/apps/web/components/schedule/time-slots/components/add-slot-form.tsx +++ b/apps/web/components/schedule/time-slots/components/add-slot-form.tsx @@ -33,7 +33,7 @@ export const AddSlotForm = withContext(ContextProvider)(function () { }; return ( -
+