import { sanitizeHtml } from "../../utils/sanitizeHtml"; type Step = { title: string; description?: string }; export type Props = { title?: string; /** JSON-encoded Step[] */ steps: string; }; export default function Steps({ title, steps }: Props) { let list: Step[] = []; try { const parsed = JSON.parse(steps ?? "[]"); if (Array.isArray(parsed)) list = parsed; } catch { /* ignore */ } return (
{title && (

{title}

)}
    {list.map((step, i) => (
  1. {/* connector line — -bottom-8 matches the pb-8 gap so the line bridges into the next step's number box */} {i < list.length - 1 && (
  2. ))}
); }