"use client"; import { useEffect, useRef, type ReactNode } from "react"; export default function IssueFlowStep({ number, title, summary, active, complete, onEdit, children, }: { number: number; title: string; summary: string; active: boolean; complete: boolean; onEdit: () => void; children: ReactNode; }) { const heading = useRef(null); useEffect(() => { if (!active || number === 1) return; heading.current?.focus({ preventScroll: true }); heading.current?.scrollIntoView({ block: "nearest", behavior: "instant" }); }, [active, number]); if (!active && !complete) return null; return (
{active ? ( <>

{title}

{children}
) : ( )}
); }