<commit_before>import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { Field, reduxForm, propTypes as reduxFormPropTypes } from 'redux-form';
import TextField from 'material-ui/TextField';
import RaisedButton from 'material-ui/RaisedButton';

// https://stackoverflow.com/questions/33138370/how-to-wire-up-redux-form-bindings-to-the-forms-inputs

const titleField = field => (
  <TextField
    hintText="What are you buying?" value={field.input.value}
    onChange={field.input.onChange} maxLength="160" fullWidth
  />
);

const priceField = field => (
  <div>
    {field.input.value ? '$' : ''}
    <TextField
      hintText="How much are you willing to pay?" value={field.input.value}
      onChange={field.input.onChange} type="number" prefix="$" min="0" step="0.01"
    />
  </div>
);

const descriptionField = field => (
  <TextField
    hintText="Describe what you're looking to buy. For best results, keep to 100 words or fewer."
    value={field.input.value} onChange={field.input.onChange} multiLine
    fullWidth
  />
);


@reduxForm({ form: 'compose' })
export default class SeekComposeForm extends PureComponent {
  static propTypes = {
    ...reduxFormPropTypes,
    style: PropTypes.object, // eslint-disable-line react/forbid-prop-types
  }

  static styles = {
    spacer: { marginTop: '1em' },
    actionButton: { margin: 8, padding: 1 },
  }

  defaultProps = {
    style: {},
  }

  render() {
    const { handleSubmit, pristine, reset, submitting } = this.props;
    const styles = SeekComposeForm.style;

    return (
      <form onSubmit={handleSubmit} style={this.props.style}>
        <div>
          <label htmlFor="title">Title</label>
          <div>
            <Field name="title" id="title" component={titleField} />
          </div>
        </div>
        <div style={styles.spacer}>
          <label htmlFor="price">Price</label>
          <div>
            <Field name="price" id="price" component={priceField} />
          </div>
        </div>
        <div style={styles.spacer}>
          <label htmlFor="description">Description</label>
          <div>
            <Field name="description" id="description" component={descriptionField} />
          </div>
        </div>
        <div>
          <RaisedButton type="submit" disabled={pristine || submitting} style={styles.actionButton}>Submit</RaisedButton>
          <RaisedButton type="button" disabled={pristine || submitting} style={styles.actionButton} onClick={reset}>Clear</RaisedButton>
        </div>
      </form>
    );
  }
}
<commit_msg>fix seek compose form not showing<commit_after>import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { Field, reduxForm, propTypes as reduxFormPropTypes } from 'redux-form';
import TextField from 'material-ui/TextField';
import RaisedButton from 'material-ui/RaisedButton';

// https://stackoverflow.com/questions/33138370/how-to-wire-up-redux-form-bindings-to-the-forms-inputs

const titleField = field => (
  <TextField
    hintText="What are you buying?" value={field.input.value}
    onChange={field.input.onChange} maxLength="160" fullWidth
  />
);

const priceField = field => (
  <div>
    {field.input.value ? '$' : ''}
    <TextField
      hintText="How much are you willing to pay?" value={field.input.value}
      onChange={field.input.onChange} type="number" prefix="$" min="0" step="0.01"
    />
  </div>
);

const descriptionField = field => (
  <TextField
    hintText="Describe what you're looking to buy. For best results, keep to 100 words or fewer."
    value={field.input.value} onChange={field.input.onChange} multiLine
    fullWidth
  />
);


@reduxForm({ form: 'compose' })
export default class SeekComposeForm extends PureComponent {
  static propTypes = {
    ...reduxFormPropTypes,
    style: PropTypes.object, // eslint-disable-line react/forbid-prop-types
  }

  static styles = {
    spacer: { marginTop: '1em' },
    actionButton: { margin: 8, padding: 1 },
  }

  defaultProps = {
    style: {},
  }

  render() {
    const { handleSubmit, pristine, reset, submitting } = this.props;
    const styles = SeekComposeForm.styles;

    return (
      <form onSubmit={handleSubmit} style={this.props.style}>
        <div>
          <label htmlFor="title">Title</label>
          <div>
            <Field name="title" id="title" component={titleField} />
          </div>
        </div>
        <div style={styles.spacer}>
          <label htmlFor="price">Price</label>
          <div>
            <Field name="price" id="price" component={priceField} />
          </div>
        </div>
        <div style={styles.spacer}>
          <label htmlFor="description">Description</label>
          <div>
            <Field name="description" id="description" component={descriptionField} />
          </div>
        </div>
        <div>
          <RaisedButton type="submit" disabled={pristine || submitting} style={styles.actionButton}>Submit</RaisedButton>
          <RaisedButton type="button" disabled={pristine || submitting} style={styles.actionButton} onClick={reset}>Clear</RaisedButton>
        </div>
      </form>
    );
  }
}

{'fraction_non_alphanumeric': 0.14603912453999612, 'fraction_numerical': 0.008134805345729227, 'mean_word_length': 2.990726429675425, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 77, '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': '5550519', 'n_tokens_mistral': 1601, 'n_tokens_neox': 1541, 'n_words': 343}