<commit_before>import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import { createStore, combineReducers } from 'redux'
import { reducer as reduxFormReducer } from 'redux-form'
import { App, Code, Markdown, Values, generateExampleBreadcrumbs } from 'redux-form-website-template'
import account from './account'

const dest = document.getElementById('content')

const reducer = combineReducers({
  account,
  form: reduxFormReducer // mounted under "form"
})
const store =
  (window.devToolsExtension ? window.devToolsExtension()(createStore) : createStore)(reducer)

const showResults = values =>
  new Promise(resolve => {
    setTimeout(() => {  // simulate server latency
      window.alert(`You submitted:\n\n${JSON.stringify(values, null, 2)}`)
      resolve()
    }, 500)
  })

let render = () => {
  const InitializeFromStateForm = require('./InitializeFromStateForm').default
  const readme = require('./InitializeFromState.md')
  const raw = require('!!raw!./InitializeFromStateForm')
  const rawAccount = require('!!raw!./account')
  ReactDOM.render(
    <Provider store={store}>
      <App
        /**
         * This <App/> component only provides the site wrapper.
         * Remove it on your dev server if you wish. It will not affect the functionality.
         */
        version="6.0.0-rc.1"
        path="/examples/initializeFromState"
        breadcrumbs={generateExampleBreadcrumbs('initializeFromState', 'Initialize From State Example', '6.0.0-rc.1')}>

        <Markdown content={readme}/>

        <h2>Form</h2>

        <InitializeFromStateForm onSubmit={showResults}/>

        <Values form="simple"/>

        <h2>Code</h2>

        <h4>account.js</h4>

        <Code source={rawAccount}/>

        <h4>InitializeFromStateForm.js</h4>

        <Code source={raw}/>

      </App>
    </Provider>,
    dest
  )
}

if (module.hot) {
  // Support hot reloading of components
  // and display an overlay for runtime errors
  const renderApp = render
  const renderError = (error) => {
    const RedBox = require('redbox-react')<commit_msg>fixed wrong form name<commit_after>import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import { createStore, combineReducers } from 'redux'
import { reducer as reduxFormReducer } from 'redux-form'
import { App, Code, Markdown, Values, generateExampleBreadcrumbs } from 'redux-form-website-template'
import account from './account'

const dest = document.getElementById('content')

const reducer = combineReducers({
  account,
  form: reduxFormReducer // mounted under "form"
})
const store =
  (window.devToolsExtension ? window.devToolsExtension()(createStore) : createStore)(reducer)

const showResults = values =>
  new Promise(resolve => {
    setTimeout(() => {  // simulate server latency
      window.alert(`You submitted:\n\n${JSON.stringify(values, null, 2)}`)
      resolve()
    }, 500)
  })

let render = () => {
  const InitializeFromStateForm = require('./InitializeFromStateForm').default
  const readme = require('./InitializeFromState.md')
  const raw = require('!!raw!./InitializeFromStateForm')
  const rawAccount = require('!!raw!./account')
  ReactDOM.render(
    <Provider store={store}>
      <App
        /**
         * This <App/> component only provides the site wrapper.
         * Remove it on your dev server if you wish. It will not affect the functionality.
         */
        version="6.0.0-rc.1"
        path="/examples/initializeFromState"
        breadcrumbs={generateExampleBreadcrumbs('initializeFromState', 'Initialize From State Example', '6.0.0-rc.1')}>

        <Markdown content={readme}/>

        <h2>Form</h2>

        <InitializeFromStateForm onSubmit={showResults}/>

        <Values form="initializeFromState"/>

        <h2>Code</h2>

        <h4>account.js</h4>

        <Code source={rawAccount}/>

        <h4>InitializeFromStateForm.js</h4>

        <Code source={raw}/>

      </App>
    </Provider>,
    dest
  )
}

if (module.hot) {
  // Support hot reloading of components
  // and display an overlay for runtime errors
  const renderApp = render
  const renderError = (error) => {
    const RedBox = require('redbox-react')
{'fraction_non_alphanumeric': 0.13270365997638725, 'fraction_numerical': 0.009445100354191263, 'mean_word_length': 3.2961460446247464, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 49, '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': '4029778', 'n_tokens_mistral': 1272, 'n_tokens_neox': 1249, 'n_words': 314}