<commit_before>import React from 'react'
import api from 'api'
import { withFormik } from 'formik'
import yup from 'yup'

import { Field, Submit } from 'components/Forms'

const InnerForm = ({
  values,
  errors,
  touched,
  handleChange,
  handleBlur,
  handleSubmit,
  isSubmitting
}) => (
  <form onSubmit={handleSubmit}>
    <Field
      name="high_school_name"
      value={values.high_school_name}
      label="School Name"
      onChange={handleChange}
      onBlur={handleBlur}
      error={touched.high_school_name && errors.high_school_name}
      mb={2}
    />
    <Field
      name="high_school_address"
      value={values.high_school_address}
      label="Full school address"
      onChange={handleChange}
      onBlur={handleBlur}
      error={touched.high_school_address && errors.high_school_address}
      mb={2}
    />
    <Field
      name="high_school_url"
      value={values.high_school_url}
      placeholder="https://"
      label="School URL"
      onChange={handleChange}
      onBlur={handleBlur}
      error={touched.high_school_url && errors.high_school_url}
      mb={2}
    />
    <Field
      name="high_school_type"
      value={values.high_school_type || 'select'}
      label="School type"
      onChange={handleChange}
      onBlur={handleBlur}
      error={touched.high_school_type && errors.high_school_type}
      mb={2}
      type="select"
    >
      <option value="select" disabled>
        Select One
      </option>
      <option value="public_school">Public</option>
      <option value="private_school">Private</option>
      <option value="charter_school">Charter</option>
    </Field>
    <Submit
      disabled={isSubmitting}
      onClick={handleSubmit}
      value="Submit"
      bg="primary"
      f={4}
    />
  </form>
)

export default withFormik({
  mapPropsToValues: props => props,
  validationSchema: yup.object().shape({
    high_school_name: yup.string().required('required'),
    high_school_address: yup.string().required('required'),
    high_school_url: yup.string().nullable(),
    high_school_type: yup
      .string()
      .required('required')
      .matches(/(public_school|private_school|charter_school)/)
  })
})(InnerForm)
<commit_msg>Style submit button in club form<commit_after>import React from 'react'
import api from 'api'
import { withFormik } from 'formik'
import yup from 'yup'

import { Field, Submit } from 'components/Forms'

const submitStatus = status =>
  ({
    success: 'Success',
    loading: 'Loading...',
    clean: 'Verify'
  }[status] || 'Update')
const submitColor = status =>
  ({
    success: 'success',
    loading: 'warning',
    clean: 'info'
  }[status] || 'primary')

const InnerForm = ({
  values,
  errors,
  touched,
  handleChange,
  handleBlur,
  handleSubmit,
  isSubmitting
}) => (
  <form onSubmit={handleSubmit}>
    <Field
      name="high_school_name"
      value={values.high_school_name}
      label="School Name"
      onChange={handleChange}
      onBlur={handleBlur}
      error={touched.high_school_name && errors.high_school_name}
      mb={2}
    />
    <Field
      name="high_school_address"
      value={values.high_school_address}
      label="Full school address"
      onChange={handleChange}
      onBlur={handleBlur}
      error={touched.high_school_address && errors.high_school_address}
      mb={2}
    />
    <Field
      name="high_school_url"
      value={values.high_school_url}
      placeholder="https://"
      label="School URL"
      onChange={handleChange}
      onBlur={handleBlur}
      error={touched.high_school_url && errors.high_school_url}
      mb={2}
    />
    <Field
      name="high_school_type"
      value={values.high_school_type || 'select'}
      label="School type"
      onChange={handleChange}
      onBlur={handleBlur}
      error={touched.high_school_type && errors.high_school_type}
      mb={2}
      type="select"
    >
      <option value="select" disabled>
        Select One
      </option>
      <option value="public_school">Public</option>
      <option value="private_school">Private</option>
      <option value="charter_school">Charter</option>
    </Field>
    <Submit
      disabled={isSubmitting}
      onClick={handleSubmit}
      value="Submit"
      bg="primary"
      f={4}
    />
  </form>
)

export default withFormik({
  mapPropsToValues: props => props,
  validationSchema: yup.object().shape({
    high_school_name: yup.string().required('required'),
    high_school_address: yup.string().required('required'),
    high_school_url: yup.string().nullable(),
    high_school_type: yup
      .string()
      .required('required')
      .matches(/(public_school|private_school|charter_school)/)
  })
})(InnerForm)

{'fraction_non_alphanumeric': 0.13331915798426536, 'fraction_numerical': 0.00212630236019562, 'mean_word_length': 3.16283185840708, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 41, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2118258', 'n_tokens_mistral': 1500, 'n_tokens_neox': 1490, 'n_words': 259}