<commit_before>import React from 'react'
import Navbar from './Navbar.jsx'
import BundleList from './BundleList.jsx'
import * as BundleStore from '../bundle-store'

class App extends React.Component {
  constructor(props) {
    super(props)
    this.state = {
      bundles: {}
    }
  }

  componentDidMount() {
    BundleStore.get().then(bundles => this.setState({bundles}))
    BundleStore.onChange(bundles => this.setState({bundles}))
  }

  render() {
    let list
    if (Object.keys(this.state.bundles).length === 0)
      list = <div className='loading'>Loading...</div>
    else
      list = <BundleList dispatch={this.props.dispatch} bundles={this.state.bundles}/>

    return (
      <div>
        <Navbar dispatch={this.props.dispatch}/>
        { list }
      </div>
    )
  }<commit_msg>:lipstick:<commit_after>import React from 'react'
import Navbar from './Navbar.jsx'
import BundleList from './BundleList.jsx'
import * as BundleStore from '../bundle-store'

class App extends React.Component {
  constructor(props) {
    super(props)
    this.state = {
      bundles: null
    }
  }

  componentDidMount() {
    const setState = bundles => this.setState({bundles})
    BundleStore.get().then(setState)
    BundleStore.onChange(setState)
  }

  render() {
    const list = this.state.bundles ?
      <BundleList dispatch={this.props.dispatch} bundles={this.state.bundles}/>
      :
      <div className='loading'>Loading...</div>

    return (
      <div>
        <Navbar dispatch={this.props.dispatch}/>
        { list }
      </div>
    )
  }
{'fraction_non_alphanumeric': 0.14743589743589744, 'fraction_numerical': 0.000641025641025641, 'mean_word_length': 2.8166259168704157, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 18, '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': '4855807', 'n_tokens_mistral': 500, 'n_tokens_neox': 486, 'n_words': 98}