<commit_before>import * as React from "react"
import styled from "styled-components"

import FacebookButton from "../components/buttons/facebook"
import Button from "../components/buttons/inverted"
import TwitterButton from "../components/buttons/twitter"
import Icon from "../components/icon"
import Input from "../components/input"
import Text from "../components/text"
import TextLink from "../components/text_link"

interface LoginProps extends React.Props<HTMLParagraphElement> {
  form?: {
    url: string,
    csrfToken?: string,
  },
  onSubmit?: () => void
}

interface LoginState {}

const LoginContainer = styled.div`
  padding: 20px;
  max-width: 350px;
  margin: 0 auto;
  align-text: center;
  display: flex;
  align-items: center;
  flex-direction: column;
`

const StyledInput = styled(Input)`
  margin: 5px 0;
  width: 100%;
`

class Login extends React.Component<LoginProps, LoginState> {
  render() {
    const form = this.props.form || {url: "/"}

    return (
      <LoginContainer>
        <Icon name="logotype" color="black" fontSize="30px" />
        <Text textSize="large" align="center">
          Welcome back, please log in <br /> to your account.
        </Text>

        <form action={form.url} method="POST" onSubmit={this.props.onSubmit}>
          <StyledInput name="email" placeholder="Email" block />
          <StyledInput name="password" placeholder="Password" type="password" block />

          {form.csrfToken && <input type="hidden" name="_csrf" value={form.csrfToken} />}

          <Button block>Log In</Button>
          <div style={{textAlign: "center"}}>or</div>
          <FacebookButton block />
          <TwitterButton block />
        </form>

        <br />

        <Text align="center">
          <span>Don't have an account? </span>
          <TextLink underline>Sign Up</TextLink>
        </Text>
      </LoginContainer>
    )
  }
}

export default Login
<commit_msg>[TSLint] disable autofixing<commit_after>import * as React from "react"
import styled from "styled-components"

import FacebookButton from "../components/buttons/facebook"
import Button from "../components/buttons/inverted"
import TwitterButton from "../components/buttons/twitter"
import Icon from "../components/icon"
import Input from "../components/input"
import Text from "../components/text"
import TextLink from "../components/text_link"

interface LoginProps extends React.Props<HTMLParagraphElement> {
  form?: {
    url: string,
    csrfToken?: string,
  },
  onSubmit?: () => void
}

interface LoginState {}

const LoginContainer = styled.div`
  padding: 20px;
  max-width: 350px;
  margin: 0 auto;
  align-text: center;
  display: flex;
  align-items: center;
  flex-direction: column;
`

const StyledInput = styled(Input)`
  margin: 5px 0;
  width: 100%;
`

class Login extends React.Component<LoginProps, LoginState> {
  render() {
    const form = this.props.form || {url: "/"}

    return (
      <LoginContainer>
        <Icon name="logotype" color="black" fontSize="30px" />
        <Text textSize="large" align="center">
          Welcome back, please log in <br /> to your account.
        </Text>

        <form action={form.url} method="POST" onSubmit={this.props.onSubmit}>
          <StyledInput name="email" placeholder="Email" block />
          <StyledInput name="password" placeholder="Password" type="password" block />

          {form.csrfToken && <input type="hidden" name="_csrf" value={form.csrfToken} />}

          <Button block>Log In</Button>
          <div style={{textAlign: "center"}}>or</div>
          <FacebookButton block />
          <TwitterButton block />
        </form>

        <br />

        <Text align="center">
          <span>Don't have an account? </span>
          <TextLink underline>Sign Up</TextLink>
        </Text>
      </LoginContainer>
    )
  }
}

export default Login
{'fraction_non_alphanumeric': 0.13941435605079036, 'fraction_numerical': 0.006737496760818865, 'mean_word_length': 3.004149377593361, 'pattern_counts': {'":': 0, '<': 55, '<?xml version=': 0, '>': 57, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '85689', 'n_tokens_mistral': 1163, 'n_tokens_neox': 1115, 'n_words': 302}