import { useState } from 'react' import { useNavigate } from 'react-router-dom' import ActivityForm from '../components/ActivityForm.jsx' import { ENTRY } from '../api/config.js' import './screens.css' /** * The three doors. Each is a separate INIT activity with its own permissions, * and the bank one lands the instance further along because the bank already * did CKYC. Whichever door is used, everything after it is identical. */ export default function AddLead() { // One door surfaced: skip the chooser entirely rather than show a list of one. const [entry, setEntry] = useState(ENTRY.length === 1 ? ENTRY[0] : null) const navigate = useNavigate() return (

Add a lead

Three doors, one machine. The door decides who may submit and where it lands — nothing after that.

{!entry ? (
{ENTRY.map((e) => ( ))}
) : (

{entry.label}

{entry.note}

{ENTRY.length > 1 ? ( ) : null}
{ const id = res?.instance_id || res?.data?.instance_id if (id) navigate(`/lead/${id}`) }} />
)}
) }