<commit_before>import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { push } from 'react-router-redux'
import { selectOnboardingCategoriesFiltered } from 'ello-brains/selectors/categories'
import { ONBOARDING_VERSION } from 'ello-brains/constants/application_types'
import OnboardingCategories from '../components/onboarding/OnboardingCategories'
import { getCategories } from '../actions/discover'
import { followCategories, saveProfile } from '../actions/profile'

const CATEGORIES_NEEDED = 0

function mapStateToProps(state) {
  return {
    categories: selectOnboardingCategoriesFiltered(state),
  }
}

function hasSelectedCategoriesNeeded(state) {
  return state.categoryIds.length < CATEGORIES_NEEDED
}

class OnboardingCategoriesContainer extends PureComponent {

  static propTypes = {
    categories: PropTypes.array.isRequired,
    dispatch: PropTypes.func.isRequired,
  }

  static childContextTypes = {
    nextLabel: PropTypes.string,
    onNextClick: PropTypes.func.isRequired,
  }

  getChildContext() {
    const { categoryIds } = this.state
    let nextLabel = ''
    if (CATEGORIES_NEEDED > categoryIds.length) {<commit_msg>Bump categories needed back up to 1<commit_after>import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { push } from 'react-router-redux'
import { selectOnboardingCategoriesFiltered } from 'ello-brains/selectors/categories'
import { ONBOARDING_VERSION } from 'ello-brains/constants/application_types'
import OnboardingCategories from '../components/onboarding/OnboardingCategories'
import { getCategories } from '../actions/discover'
import { followCategories, saveProfile } from '../actions/profile'

const CATEGORIES_NEEDED = 1

function mapStateToProps(state) {
  return {
    categories: selectOnboardingCategoriesFiltered(state),
  }
}

function hasSelectedCategoriesNeeded(state) {
  return state.categoryIds.length < CATEGORIES_NEEDED
}

class OnboardingCategoriesContainer extends PureComponent {

  static propTypes = {
    categories: PropTypes.array.isRequired,
    dispatch: PropTypes.func.isRequired,
  }

  static childContextTypes = {
    nextLabel: PropTypes.string,
    onNextClick: PropTypes.func.isRequired,
  }

  getChildContext() {
    const { categoryIds } = this.state
    let nextLabel = ''
    if (CATEGORIES_NEEDED > categoryIds.length) {
{'fraction_non_alphanumeric': 0.09387755102040816, 'fraction_numerical': 0.0012244897959183673, 'mean_word_length': 4.992665036674817, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '127044', 'n_tokens_mistral': 737, 'n_tokens_neox': 703, 'n_words': 158}