<commit_before>import React, { Component } from 'react'

import Sidebar from '../components/Sidebar'
import Notifier from '../components/Notifier'

import Loading from '../components/Loading'
import Failure from '../components/Failure'

class App extends Component {
  constructor (props, context) {
    super(props, context)
    this.store = this.context.store

    this.state = {
      categories: [],
      isFetching: true
    }

    this.store.fetchInitialData(props.domain)
      .then(() => {
        this.setState({
          categories: this.store.categories,
          isFetching: false
        })
      })
      .catch(error => {
        this.setState({
          isFetching: false,
          error
        })
      })
  }

  render () {
    const { children } = this.props
    const { categories, isFetching, error } = this.state
    if (error) {
      return (
        <div className='con-initial-error'><commit_msg>feat: log error at startup :speaker:<commit_after>import React, { Component } from 'react'

import Sidebar from '../components/Sidebar'
import Notifier from '../components/Notifier'

import Loading from '../components/Loading'
import Failure from '../components/Failure'

class App extends Component {
  constructor (props, context) {
    super(props, context)
    this.store = this.context.store

    this.state = {
      categories: [],
      isFetching: true
    }

    this.store.fetchInitialData(props.domain)
      .then(() => {
        this.setState({
          categories: this.store.categories,
          isFetching: false
        })
      })
      .catch(error => {
        console.error(error)
        this.setState({
          isFetching: false,
          error
        })
      })
  }

  render () {
    const { children } = this.props
    const { categories, isFetching, error } = this.state
    if (error) {
      return (
        <div className='con-initial-error'>
{'fraction_non_alphanumeric': 0.12460732984293194, 'fraction_numerical': 0.0, 'mean_word_length': 2.2280405405405403, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '2449672', 'n_tokens_mistral': 538, 'n_tokens_neox': 539, 'n_words': 129}