<commit_before>import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import {
  setUserInputAction,
  setPasswordInputAction
 } from '../actions/inputs'

class UserNamePasswordCollection extends React.Component {
  constructor(props) {
    super(props)
    this.onSubmit = this.onSubmit.bind(this)
  }

  onSubmit(e){
    e.preventDefault()
    const { onSubmit, userName, password } = this.props
    onSubmit(userName, password)
  }

  render() {
    return (
      <div className="outer-input-form">
        <form className="input-form center-content" onSubmit={this.onSubmit}>
          <label to="user-name-input" className="label">User Name: </label>
          <input
            id="user-name-input"
            value={this.props.userName}
            onChange={(e) => this.props.userOnChange(e.target.value)}
            type="text"
            className="nightlife-input"
          />
          <label to="user-password-input" className="label">Password</label>
          <input
            id="user-password-input"
            value={this.props.password}
            onChange={(e) => this.props.passwordOnChange(e.target.value)}
            className="nightlife-input"
            type="password"
          />
          <button
            id="submit"
            className="nightlife-button"
            onSubmit={this.onSubmit}>{this.props.buttonText}
          </button>
        </form>
      </div>
    )
  }
}

UserNamePasswordCollection.propTypes = {
  buttonText: PropTypes.string.isRequired,
  password: PropTypes.string,
  userName: PropTypes.string,
  userOnChange: PropTypes.func,
  passwordOnChange: PropTypes.func,
  onSubmit: PropTypes.func
}

const mapStateToProps = (state) => {
  return {<commit_msg>Using NightlifeButton on the login screen<commit_after>import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import {
  setUserInputAction,
  setPasswordInputAction
 } from '../actions/inputs'
 import NightlifeButton from './NightlifeButton'

class UserNamePasswordCollection extends React.Component {
  constructor(props) {
    super(props)
    this.onSubmit = this.onSubmit.bind(this)
  }

  onSubmit(e){
    e.preventDefault()
    const { onSubmit, userName, password } = this.props
    onSubmit(userName, password)
  }

  render() {
    return (
      <div className="outer-input-form">
        <form className="input-form center-content" onSubmit={this.onSubmit}>
          <label to="user-name-input" className="label">User Name: </label>
          <input
            id="user-name-input"
            value={this.props.userName}
            onChange={(e) => this.props.userOnChange(e.target.value)}
            type="text"
            className="nightlife-input"
          />
          <label to="user-password-input" className="label">Password</label>
          <input
            id="user-password-input"
            value={this.props.password}
            onChange={(e) => this.props.passwordOnChange(e.target.value)}
            className="nightlife-input"
            type="password"
          />
          <NightlifeButton
            className="nightlife-button"
            onSubmit={this.onSubmit}>{this.props.buttonText}
          </NightlifeButton>
        </form>
      </div>
    )
  }
}

UserNamePasswordCollection.propTypes = {
  buttonText: PropTypes.string.isRequired,
  password: PropTypes.string,
  userName: PropTypes.string,
  userOnChange: PropTypes.func,
  passwordOnChange: PropTypes.func,
  onSubmit: PropTypes.func
}

const mapStateToProps = (state) => {
  return {
{'fraction_non_alphanumeric': 0.12482701356213673, 'fraction_numerical': 0.0, 'mean_word_length': 2.6067864271457086, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 33, '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': '6261772', 'n_tokens_mistral': 1034, 'n_tokens_neox': 1046, 'n_words': 184}