From 4aa774ef1899d64671510b67a63f65188cea7963 Mon Sep 17 00:00:00 2001 From: AmzBG Date: Mon, 10 Aug 2026 23:34:13 +0300 Subject: [PATCH 1/2] fix: make onboarding responsive --- apps/web/app/onboarding/page.tsx | 13 +++-- apps/web/components/onboarding-wizard.tsx | 61 +++++++++++++---------- 2 files changed, 42 insertions(+), 32 deletions(-) diff --git a/apps/web/app/onboarding/page.tsx b/apps/web/app/onboarding/page.tsx index 1f46c9d..ce058c3 100644 --- a/apps/web/app/onboarding/page.tsx +++ b/apps/web/app/onboarding/page.tsx @@ -13,9 +13,6 @@ export default function OnboardingPage() { useEffect(() => { if (!isLoading && user && isProfileComplete(user)) { - console.log( - '[DEBUG] Onboarding Page - Profile already complete. Sending to /dashboard', - ); router.replace('/dashboard'); } }, [user, isLoading, router]); @@ -29,10 +26,12 @@ export default function OnboardingPage() { } return ( -
-
-
-

Welcome aboard!

+
+
+
+

+ Welcome aboard! +

Let's get your profile set up so you can get started.

diff --git a/apps/web/components/onboarding-wizard.tsx b/apps/web/components/onboarding-wizard.tsx index 74e19da..5084aa7 100644 --- a/apps/web/components/onboarding-wizard.tsx +++ b/apps/web/components/onboarding-wizard.tsx @@ -1,6 +1,6 @@ 'use client'; -import { useRef, useState } from 'react'; +import { useEffect, useRef, useState } from 'react'; import { useRouter } from 'next/navigation'; import { useForm, Controller, type Path } from 'react-hook-form'; import { zodResolver } from '@hookform/resolvers/zod'; @@ -77,11 +77,16 @@ export function OnboardingWizard({ user }: OnboardingWizardProps) { const [step, setStep] = useState(1); const [isSubmitting, setIsSubmitting] = useState(false); const [isCheckingSlug, setIsCheckingSlug] = useState(false); + const [profileHost, setProfileHost] = useState('site.com'); const router = useRouter(); const { updateProfile } = useAuth(); const isDev = user.accountType === 'DEVELOPER'; + useEffect(() => { + setProfileHost(window.location.host); + }, []); + // Compute clean initial values for developer profile const initialDisplayName = isDev ? formatCleanName(user.developerProfile?.displayName) @@ -245,21 +250,21 @@ export function OnboardingWizard({ user }: OnboardingWizardProps) { }; return ( - - -
+ + +
= 1 ? 'text-primary font-semibold' : 'text-muted-foreground' - } + className={`shrink-0 whitespace-nowrap ${ + step >= 1 ? 'font-semibold text-primary' : 'text-muted-foreground' + }`} > 1. The Basics -
+
= 2 ? 'text-primary font-semibold' : 'text-muted-foreground' - } + className={`shrink-0 whitespace-nowrap ${ + step >= 2 ? 'font-semibold text-primary' : 'text-muted-foreground' + }`} > 2. Details @@ -267,7 +272,7 @@ export function OnboardingWizard({ user }: OnboardingWizardProps) {
- + {/* STEP 1: Required Fields */} {step === 1 && isDev && (
@@ -292,16 +297,13 @@ export function OnboardingWizard({ user }: OnboardingWizardProps) { Public Profile Handle{' '} * -
- - {typeof window !== 'undefined' - ? window.location.host - : 'site.com'} - /developers/ +
+ + {profileHost}/developers/ (