MCPcopy
hub / github.com/ifandelse/machina.js / handleSubmit

Function handleSubmit

examples/with-react/src/components/PaymentStep.tsx:40–46  ·  view source on GitHub ↗
(e: React.FormEvent)

Source from the content-addressed store, hash-verified

38 const [scenario, setScenario] = useState<PaymentScenario>(context.paymentScenario);
39
40 function handleSubmit(e: React.FormEvent) {
41 e.preventDefault();
42 if (!canHandle("next")) {
43 return;
44 }
45 handle("next", { cardNumber, expiry, cvv, scenario });
46 }
47
48 return (
49 <div className="step-card">

Callers

nothing calls this directly

Calls 2

canHandleFunction · 0.85
handleFunction · 0.85

Tested by

no test coverage detected