David Prince
fix: add all missing local module stubs (remote_mcp_registry, mcp_auth, mcp_transport, etc)
cce8120
Raw
History Blame Contribute Delete
641 Bytes
import React, { useState } from 'react';
interface Props {
onAdd: (title: string) => void;
}
const AddTodo: React.FC<Props> = ({ onAdd }) => {
const [title, setTitle] = useState('');
const handleSubmit = (e: React.FormEvent) => {
e.preventDefault();
if (title.trim()) {
onAdd(title.trim());
setTitle('');
}
};
return (
<form onSubmit={handleSubmit}>
<input
type="text"
placeholder="New todo"
value={title}
onChange={(e) => setTitle(e.target.value)}
required
/>
<button type="submit">Add</button>
</form>
);
};
export default AddTodo;