;
isLoading?: boolean;
}
export default function SignUpForm({ onSubmit, isLoading = false }: SignUpProps) {
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
+ const [username, setUsername] = useState('');
const [error, setError] = useState('');
const handleSubmit = async (e: React.SubmitEvent) => {
e.preventDefault();
- await onSubmit(email, password);
+ await onSubmit(email, password, username);
};
@@ -26,6 +27,14 @@ export default function SignUpForm({ onSubmit, isLoading = false }: SignUpProps)
placeholder="Enter email"
/>
+
+ setUsername(e.target.value)}
+ placeholder="Enter username"
+ />
+