<commit_before>import React from 'react';
import Lock from '../lock/lock';
import AskEmail from './ask_email';
import AskVerificationCode from './ask_verification_code';
import Done from './done';
import { LockStates } from '../control/constants';
import { requestPasswordlessEmail, signIn } from './actions';

export default function render(lock) {
  const state = lock.get("state");
  switch(state) {
  case LockStates.ASK_VERIFICATION_CODE:
    return (
      <Lock lock={lock} showHeader={true} submitHandler={askVerificationCodeSubmitHandler}>
        <AskVerificationCode />
      </Lock>
    );
  case LockStates.DONE:
    return <Lock lock={lock} showHeader={false}><Done /></Lock>;
  case LockStates.READY:
    return (
      <Lock lock={lock} showHeader={true} submitHandler={askEmailSubmitHandler}>
        <AskEmail />
      </Lock>
    );
  default:
    const mode = lock.get("mode");
    throw new Error(`unknown state ${state} for mode ${mode}`)<commit_msg>Disable passwordless email code support for now<commit_after>import React from 'react';
import Lock from '../lock/lock';
import AskEmail from './ask_email';
import AskVerificationCode from './ask_verification_code';
import Done from './done';
import { LockStates } from '../control/constants';
import { requestPasswordlessEmail, signIn } from './actions';

export default function render(lock) {
  const state = lock.get("state");
  switch(state) {
  // case LockStates.ASK_VERIFICATION_CODE:
  //   return (
  //     <Lock lock={lock} showHeader={true} submitHandler={askVerificationCodeSubmitHandler}>
  //       <AskVerificationCode />
  //     </Lock>
  //   );
  case LockStates.DONE:
    return <Lock lock={lock} showHeader={false}><Done /></Lock>;
  case LockStates.READY:
    return (
      <Lock lock={lock} showHeader={true} submitHandler={askEmailSubmitHandler}>
        <AskEmail />
      </Lock>
    );
  default:
    const mode = lock.get("mode");
    throw new Error(`unknown state ${state} for mode ${mode}`)
{'fraction_non_alphanumeric': 0.1432865731462926, 'fraction_numerical': 0.0, 'mean_word_length': 3.8120481927710843, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '5981340', 'n_tokens_mistral': 577, 'n_tokens_neox': 570, 'n_words': 153}