import type { OnboardingStep } from '@/routes/onboarding/route'; import { useMatchRoute } from '@tanstack/react-router'; interface VerticalStepperProps { steps: Array; linearSteps: Array>; }; export function Stepper({ steps, linearSteps }: VerticalStepperProps) { const matchRoute = useMatchRoute(); const currentLinearIndex = linearSteps.findIndex(step => matchRoute({ to: step.path })); const progressHeight = currentLinearIndex >= 0 ? `${(currentLinearIndex / (linearSteps.length - 1)) * 100}%` : '0%'; // const nextStep = () => { // if (currentStep < steps.length - 1) // setCurrentStep(currentStep + 1); // }; // const prevStep = () => { // if (currentStep > 0) // setCurrentStep(currentStep - 1); // }; // const goToStep = (stepIndex: number) => { // setCurrentStep(stepIndex); // }; return (
    {steps.map((step, index) => (
  • goToStep(index)} >
    {step.title}
  • ))}
); }