Digite script
const submitFormData = (e) => {
e.preventDefault();
// checking if value of first name and last name is empty show error else take to step 2
if (
validator.isEmpty(values.firstName) ||
validator.isEmpty(values.lastName)
) {
setError(true);
} else {
nextStep();
}
};
Helpless Hamster