<commit_before>import { Formik, FormikProps } from "formik"
import React from "react"
import Yup from "yup"
import Wizard from "./Wizard"
import { Step } from "./Step"

import {
  ChangeMode,
  FormContainer,
  inputValidators,
  StyledFacebookButton,
  StyledInput as Input,
  TOSCheckbox,
} from "../commonElements"
import { FormComponentType, InputValues } from "../Types"

// interface StepProps {
//   onNextButtonPressed: () => void
// }

export const MobileRegisterForm: FormComponentType = props => {
  return (
    <Formik
      initialValues={props.values}
      onSubmit={props.handleSubmit}
      validationSchema={Yup.object().shape(inputValidators)}
    >
      {({
        values,
        errors,
        touched,
        handleChange,
        handleBlur,
        handleSubmit,
        isSubmitting,
      }: FormikProps<InputValues>) => {
        return (
          <FormContainer onSubmit={handleSubmit}>
            <Wizard>
              {handleValidation => {
                return (
                  <div>
                    <Step onValidation={handleValidation}>
                      <Input
                        type="email"
                        block
                        error={touched.email && errors.email}
                        name="email"
                        placeholder="Email"
                        value={values.email}
                        onChange={handleChange}
                        onBlur={handleBlur}
                      />
                      <Input
                        type="email"
                        block
                        error={touched.email && errors.email}
                        name="email2"
                        placeholder="Email"
                        value={values.email}
                        onChange={handleChange}
                        onBlur={handleBlur}
                      />
                    </Step>
                    <Step onValidation={handleValidation}>
                      <Input
                        block
                        error={touched.password && errors.password}
                        name="password"
                        placeholder="Password"
                        type="password"
                        value={values.password}
                        onChange={handleChange}
                        onBlur={handleBlur}
                      />
                    </Step>
                    <Step onValidation={handleValidation}>
                      <Input
                        block
                        error={touched.name && errors.name}
                        name="name"
                        placeholder="Name"
                        type="text"
                        value={values.name}
                        onChange={handleChange}
                        onBlur={handleBlur}
                      />
                      <TOSCheckbox
                        error={
                          touched.acceptedTermsOfService &&
                          errors.acceptedTermsOfService
                        }
                        value={values.acceptedTermsOfService}
                        type="checkbox"
                        name="accepted-terms-of-service"
                        onChange={handleChange}
                        onBlur={handleBlur}
                        errorMessage={errors.acceptedTermsOfService}
                      >
                        I Agree to the TOS And PP
                      </TOSCheckbox>
                    </Step>
                  </div>
                )
              }}
            </Wizard>

            <StyledFacebookButton>Sign up with Facebook</StyledFacebookButton>
            <p>
              Already have an account?
              <ChangeMode handleClick={props.handleChangeMode("login")}>
                Log In
              </ChangeMode>
            </p>
          </FormContainer>
        )
      }}
    </Formik>
  )
}
<commit_msg>remove extra input element<commit_after>import { Formik, FormikProps } from "formik"
import React from "react"
import Yup from "yup"
import Wizard from "./Wizard"
import { Step } from "./Step"

import {
  ChangeMode,
  FormContainer,
  inputValidators,
  StyledFacebookButton,
  StyledInput as Input,
  TOSCheckbox,
} from "../commonElements"
import { FormComponentType, InputValues } from "../Types"

export const MobileRegisterForm: FormComponentType = props => {
  return (
    <Formik
      initialValues={props.values}
      onSubmit={props.handleSubmit}
      validationSchema={Yup.object().shape(inputValidators)}
    >
      {({
        values,
        errors,
        touched,
        handleChange,
        handleBlur,
        handleSubmit,
        isSubmitting,
      }: FormikProps<InputValues>) => {
        return (
          <FormContainer onSubmit={handleSubmit}>
            <Wizard>
              {handleValidation => {
                return (
                  <div>
                    <Step onValidation={handleValidation}>
                      <Input
                        type="email"
                        block
                        error={touched.email && errors.email}
                        name="email"
                        placeholder="Email"
                        value={values.email}
                        onChange={handleChange}
                        onBlur={handleBlur}
                      />
                    </Step>
                    <Step onValidation={handleValidation}>
                      <Input
                        block
                        error={touched.password && errors.password}
                        name="password"
                        placeholder="Password"
                        type="password"
                        value={values.password}
                        onChange={handleChange}
                        onBlur={handleBlur}
                      />
                    </Step>
                    <Step onValidation={handleValidation}>
                      <Input
                        block
                        error={touched.name && errors.name}
                        name="name"
                        placeholder="Name"
                        type="text"
                        value={values.name}
                        onChange={handleChange}
                        onBlur={handleBlur}
                      />
                      <TOSCheckbox
                        error={
                          touched.acceptedTermsOfService &&
                          errors.acceptedTermsOfService
                        }
                        value={values.acceptedTermsOfService}
                        type="checkbox"
                        name="accepted-terms-of-service"
                        onChange={handleChange}
                        onBlur={handleBlur}
                        errorMessage={errors.acceptedTermsOfService}
                      >
                        I Agree to the TOS And PP
                      </TOSCheckbox>
                    </Step>
                  </div>
                )
              }}
            </Wizard>

            <StyledFacebookButton>Sign up with Facebook</StyledFacebookButton>
            <p>
              Already have an account?
              <ChangeMode handleClick={props.handleChangeMode("login")}>
                Log In
              </ChangeMode>
            </p>
          </FormContainer>
        )
      }}
    </Formik>
  )
}

{'fraction_non_alphanumeric': 0.08310027966440271, 'fraction_numerical': 0.00013317352510320947, 'mean_word_length': 0.9846723044397463, 'pattern_counts': {'":': 0, '<': 56, '<?xml version=': 0, '>': 63, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '250517', 'n_tokens_mistral': 1712, 'n_tokens_neox': 1575, 'n_words': 293}