<commit_before>import React, { Component } from 'react'
import {connect} from 'react-redux'
import * as actionCreators from '../action-creators';
import { createStore } from 'redux'

import Navbar from './navbar.jsx'
import Restaurant from './restaurant.jsx'
import YeahNahBar from './yeah-nah-bar.jsx'


import Splash from './splash.jsx'
import simulate from '../../lib/simulate-get-restaurants'

export class App extends Component {

  constructor (props) {
    super(props)
  }

  componentWillMount() {
    this.props.preferences.updated ? console.log('app sees user preferences: ', this.props.preferences) :
    console.log('no change in preferences')
  }

  render() {
    if (this.props.preferences.updated) {
     setTimeout(() => {
        const newprefs = Object.assign({}, this.props.preferences)
        newprefs.updated = false
        console.log('simulating')
        return this.props.changePreferences(newprefs)},
      2000)

     return (
        <div>
          <Navbar />
          <Splash />
        </div>
      )
    } else {
      return (
        <div>
          <Navbar />
          <Restaurant {...this.props} />
        </div>
      )
    }
 }
}

function mapStateToProps (state) {
  return {
    restaurant: state.Restaurant,
    preferences: state.Preferences
  }
}

export const AppContainer = connect(<commit_msg>add yeah nah bar back into appjsx<commit_after>import React, { Component } from 'react'
import {connect} from 'react-redux'
import * as actionCreators from '../action-creators';
import { createStore } from 'redux'

import Navbar from './navbar.jsx'
import Restaurant from './restaurant.jsx'
import YeahNahBar from './yeah-nah-bar.jsx'


import Splash from './splash.jsx'
import simulate from '../../lib/simulate-get-restaurants'

export class App extends Component {

  constructor (props) {
    super(props)
  }

  componentWillMount() {
    this.props.preferences.updated ? console.log('app sees user preferences: ', this.props.preferences) :
    console.log('no change in preferences')
  }

  render() {
    if (this.props.preferences.updated) {
     setTimeout(() => {
        const newprefs = Object.assign({}, this.props.preferences)
        newprefs.updated = false
        console.log('simulating')
        return this.props.changePreferences(newprefs)},
      2000)

     return (
        <div>
          <Navbar />
          <Splash />
        </div>
      )
    } else {
      return (
        <div>
          <Navbar />
          <Restaurant {...this.props} />
          <YeahNahBar {...this.props} />
        </div>
      )
    }
 }
}

function mapStateToProps (state) {
  return {
    restaurant: state.Restaurant,
    preferences: state.Preferences
  }
}

export const AppContainer = connect(
{'fraction_non_alphanumeric': 0.13112967671630948, 'fraction_numerical': 0.002905920813657828, 'mean_word_length': 2.481668773704172, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 22, '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': '5738227', 'n_tokens_mistral': 855, 'n_tokens_neox': 830, 'n_words': 197}