"use client"; import classNames from "classnames"; import { signOut } from "next-auth/react"; import { Children, type ReactNode } from "react"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Button } from "@calcom/ui/components/button"; import { Logo } from "@calcom/ui/components/logo"; type OnboardingLayoutProps = { userEmail: string; currentStep: number; totalSteps: number; children: ReactNode; }; export const OnboardingLayout = ({ userEmail, currentStep, totalSteps, children }: OnboardingLayoutProps) => { const { t } = useLocale(); const handleSignOut = () => { signOut({ callbackUrl: "/auth/logout" }); }; // Extract children as array const childrenArray = Children.toArray(children); const column1 = childrenArray[0]; const column2 = childrenArray[1]; return (
{/* Logo and container - centered */}
{/* Column 1 - Always visible, 40% on xl+ */}
{column1}
{/* Column 2 - Hidden on mobile, visible on xl+, 60% on xl+ */} {column2 && (
{column2}
)}
{/* Footer with progress dots and sign out */}
{Array.from({ length: totalSteps }, (_, i) => i + 1).map((step) => { const isCurrentStep = step === currentStep; const isCompleted = step < currentStep; return (
{(isCompleted || isCurrentStep) && (
)}
); })}
); };