import { Registration } from "@/types/registration"; const STEPS: { key: string; label: string }[] = [ { key: "submitted", label: "Submitted" }, { key: "form_submitted", label: "Form submitted" }, { key: "payment_pending", label: "Payment pending" }, { key: "payment_confirmed", label: "Payment confirmed" }, { key: "video_submitted", label: "Video submitted" }, { key: "accepted", label: "Accepted" }, ]; interface Props { registration: Registration; } export function RegistrationTimeline({ registration }: Props) { const currentIndex = STEPS.findIndex((s) => s.key === registration.status); const isRejected = registration.status === "rejected"; const isWaitlisted = registration.status === "waitlisted"; if (isRejected) { return (
Your registration was rejected.
); } if (isWaitlisted) { return (
You are on the waitlist.
); } return (

Registration progress

    {STEPS.map((step, i) => { const done = i <= currentIndex; return (
  1. {done ? "✓" : i + 1} {step.label}
  2. ); })}
); }