import { useRouter } from "next/router"; import classNames from "@calcom/lib/classNames"; import Button from "@calcom/ui/v2/Button"; import Stepper from "@calcom/ui/v2/Stepper"; type DefaultStep = { title: string; description: string; content: JSX.Element; enabled?: boolean; isLoading: boolean; }; function WizardForm(props: { href: string; steps: T[]; containerClassname?: string }) { const { href, steps } = props; const router = useRouter(); const step = parseInt((router.query.step as string) || "1"); const currentStep = steps[step - 1]; const setStep = (newStep: number) => { router.replace(`${href}?step=${newStep || 1}`, undefined, { shallow: true }); }; return (
{/* eslint-disable-next-line @next/next/no-img-element */} Cal.com Logo

{currentStep.title}

{currentStep.description}

{currentStep.content}
{currentStep.enabled !== false && (
{step > 1 && ( )}
)}
); } export default WizardForm;