From cce4969c299dfa92c3122836d4ea4d9e4edaf5f4 Mon Sep 17 00:00:00 2001 From: LuizGarbini Date: Fri, 17 Apr 2026 22:41:46 -0300 Subject: [PATCH 1/2] Refactor layout and onboarding components for improved clarity and functionality - Removed unused headers and onboarding state from RootLayout, simplifying the component structure. - Updated call-to-action text in OnboardingCelebration to use a more relevant label. - Moved onboarding state determination to LayoutWrapper using usePathname for better encapsulation. --- apps/web/src/app/[lang]/layout.tsx | 6 ------ .../_components/steps/onboarding-celebration.tsx | 2 +- apps/web/src/components/layout-wrapper.tsx | 8 ++++++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/apps/web/src/app/[lang]/layout.tsx b/apps/web/src/app/[lang]/layout.tsx index 7331e9f51..5606bc8a0 100644 --- a/apps/web/src/app/[lang]/layout.tsx +++ b/apps/web/src/app/[lang]/layout.tsx @@ -1,4 +1,3 @@ -import { headers } from 'next/headers' import { Link } from 'next-view-transitions' import type { GetUserPreferences200 } from '@/api/endpoints.schemas' import { getUserPreferences } from '@/api/users' @@ -43,10 +42,6 @@ export default async function RootLayout({ userPreferences = data?.userPreferences ?? null } - const headersList = await headers() - const pathname = headersList.get('x-current-path') || '' - const isOnboarding = pathname.includes('/onboarding') - return ( } footer={