<commit_before>import React, { Fragment } from 'react'
import { url as apiUrl } from 'api'
import { Container, LargeButton, Heading, Text } from '@hackclub/design-system'
import {
  Aside,
  AutoSaver,
  ConfirmClose,
  Field,
  Fieldset,
  Form,
  FormWrapper,
  Submit
} from 'components/Forms'
import { withFormik } from 'formik'
import Link from 'gatsby-link'
import * as yup from 'yup'

LargeButton.link = LargeButton.withComponent(Link)

const InnerForm = props => {
  const {
    values,
    errors,
    touched,
    handleChange,
    handleBlur,
    handleSubmit,
    isSubmitting,
    params
  } = props
  return (
    <FormWrapper>
      <Form onSubmit={handleSubmit}>
        <Fieldset section="leader">
          <Field
            name="leader_name"
            label="<NAME>"
            onChange={handleChange}
            onBlur={handleBlur}
            value={values.leader_name}
            error={touched.leader_name && errors.leader_name}
          />
          <Field
            name="leader_birthday"
            label="Birthday"
            onChange={handleChange}
            onBlur={handleBlur}
            value={values.leader_birthday}
            error={touched.leader_birthday && errors.leader_birthday}
            type="date"
          />
          <Field
            name="leader_year_in_school"
            label="Year in school"
            onChange={handleChange}
            onBlur={handleBlur}
            value={values.leader_year_in_school || 'select'}
            error={
              touched.leader_year_in_school && errors.leader_year_in_school
            }
            type="select"
          >
            <option value="select" disabled>
              Select One
            </option>
            <option value="freshman">Freshman</option>
            <option value="sophomore">Sophomore</option>
            <option value="junior">Junior</option>
            <option value="senior">Senior</option>
            <option value="other_year">Other year</option>
          </Field>
          <Field
            name="leader_phone_number"
            label="Phone number (include country code if not in the United States)"
            onChange={handleChange}
            onBlur={handleBlur}
            value={values.leader_phone_number}
            error={touched.leader_phone_number && errors.leader_phone_number}
            type="tel"
          />
          <Field
            name="leader_address"
            label="Your full address (include city, state/province, country)"
            hint="As part of Hack Club, we’ll occasionally send you physical materials (like stickers) to help market your club. Please enter your address exactly as we should write it on an envelope."
            onChange={handleChange}
            onBlur={handleBlur}
            value={values.leader_address}
            error={touched.leader_address && errors.leader_address}
            type="textarea"
          />
        </Fieldset>
        <Fieldset section="stats">
          <Text color="gray.8" pb={3}>
            Demographic stats are collected to share in aggregate with donors and will not be used as part of application review.
          </Text>
          <Field
            name="leader_gender"
            label="Gender"
            onChange={handleChange}
            onBlur={handleBlur}
            value={values.leader_gender || 'select'}
            error={touched.leader_gender && errors.leader_gender}
            type="select"
          >
            <option value="select" disabled>
              Select One
            </option>
            <option value="male">Male</option><commit_msg>Shorten address label in application<commit_after>import React, { Fragment } from 'react'
import { url as apiUrl } from 'api'
import { Container, LargeButton, Heading, Text } from '@hackclub/design-system'
import {
  Aside,
  AutoSaver,
  ConfirmClose,
  Field,
  Fieldset,
  Form,
  FormWrapper,
  Submit
} from 'components/Forms'
import { withFormik } from 'formik'
import Link from 'gatsby-link'
import * as yup from 'yup'

LargeButton.link = LargeButton.withComponent(Link)

const InnerForm = props => {
  const {
    values,
    errors,
    touched,
    handleChange,
    handleBlur,
    handleSubmit,
    isSubmitting,
    params
  } = props
  return (
    <FormWrapper>
      <Form onSubmit={handleSubmit}>
        <Fieldset section="leader">
          <Field
            name="leader_name"
            label="<NAME>"
            onChange={handleChange}
            onBlur={handleBlur}
            value={values.leader_name}
            error={touched.leader_name && errors.leader_name}
          />
          <Field
            name="leader_birthday"
            label="Birthday"
            onChange={handleChange}
            onBlur={handleBlur}
            value={values.leader_birthday}
            error={touched.leader_birthday && errors.leader_birthday}
            type="date"
          />
          <Field
            name="leader_year_in_school"
            label="Year in school"
            onChange={handleChange}
            onBlur={handleBlur}
            value={values.leader_year_in_school || 'select'}
            error={
              touched.leader_year_in_school && errors.leader_year_in_school
            }
            type="select"
          >
            <option value="select" disabled>
              Select One
            </option>
            <option value="freshman">Freshman</option>
            <option value="sophomore">Sophomore</option>
            <option value="junior">Junior</option>
            <option value="senior">Senior</option>
            <option value="other_year">Other year</option>
          </Field>
          <Field
            name="leader_phone_number"
            label="Phone number (include country code if not in the United States)"
            onChange={handleChange}
            onBlur={handleBlur}
            value={values.leader_phone_number}
            error={touched.leader_phone_number && errors.leader_phone_number}
            type="tel"
          />
          <Field
            name="leader_address"
            label="Your full address (where we can ship you stickers)"
            hint="Please include city, state / province, country, and postal code (if available)."
            onChange={handleChange}
            onBlur={handleBlur}
            value={values.leader_address}
            error={touched.leader_address && errors.leader_address}
            type="textarea"
          />
        </Fieldset>
        <Fieldset section="stats">
          <Text color="gray.8" pb={3}>
            Demographic stats are collected to share in aggregate with donors and will not be used as part of application review.
          </Text>
          <Field
            name="leader_gender"
            label="Gender"
            onChange={handleChange}
            onBlur={handleBlur}
            value={values.leader_gender || 'select'}
            error={touched.leader_gender && errors.leader_gender}
            type="select"
          >
            <option value="select" disabled>
              Select One
            </option>
            <option value="male">Male</option>
{'fraction_non_alphanumeric': 0.09959660592571985, 'fraction_numerical': 0.0005564056196967589, 'mean_word_length': 1.9431027425296765, 'pattern_counts': {'":': 0, '<': 65, '<?xml version=': 0, '>': 67, 'https://': 0, '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': '4432135', 'n_tokens_mistral': 1984, 'n_tokens_neox': 1894, 'n_words': 427}