"use client"; 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: 1 | 2 | 3; children: ReactNode; }; export const OnboardingLayout = ({ userEmail, currentStep, 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 */}
{[1, 2, 3].map((step) => (
{step <= currentStep &&
}
))}
); };