<commit_before>import React, { Component } from 'react';
import {
  Text,
  View,
  Image,
  TouchableHighlight,
  TouchableOpacity,
  Switch
} from 'react-native';
import styles from '../styles.ios.js';
import Nav from './Navbar.ios.js';
import SearchBar from './Searchbar.ios.js';
import { connect } from "react-redux";
import {bindActionCreators} from 'redux';
import * as app from '../actions/appActions.ios.js';
import getApp from '../reducers/appReducers.ios.js';
import camera from './Camera.ios.js';
import FacebookLogin from './FacebookLogin.ios.js';

class App extends Component {
  constructor(props) {
    super(props);
  }

  border(color) {
    return {
      borderColor: color,
      borderWidth: 5,
    }
  }

  changeNavigationHome() {
    this.props.navigator.push({
      id: 'Home'
    })
  }

  changeNavigationCamera() {
    this.props.navigator.push({
      component: camera,
      passProps: { store: this.props.store }
    })
  }

  rendering() {
    actions.rendering();
    this.forceUpdate()
  }
  render() {
    const {state, actions} = this.props;
    if (state.rendering) {
      return (
        <Image 
          source= {{uri: 'https://media.blueapron.com/assets/loader/pot-loader-6047abec2ec57c18d848f623c036f7fe80236dce689bb48279036c4f914d0c9e.gif'}}
          style = {styles.loadingGif}
        />
      )
    }
    return (
      <View style={[styles.container]}>
        <View style={[styles.navigation]} >
          <Nav
            changeNavigationCamera={this.changeNavigationCamera.bind(this)}
          />
        </View>
        <View style={styles.app} >
          <Image style={styles.welcomeImage} source={require('../public/snacktimewelcome.jpg')}/>
          <FacebookLogin />
        </View>
        { /* conditional camera / search bar render */
          state.showSearchBar
            ? 
              (
                <View style={[styles.searchBarPictureFrame]} >
                  <SearchBar store={this.props.store}
                             navigator={this.props.navigator}
                             rendering={actions.rendering}
                             lagOut={actions.laggedOut} 
                             isRendering={state.rendering}
                  />
                </View>
              )
            : 
              (
                <TouchableHighlight style={[styles.buttonView]} 
                                    onPress={this.changeNavigationCamera.bind(this)}>
                  <Image 
                    style={[styles.takePicture]}
                    source={{uri: 'https://s3.amazonaws.com/features.ifttt.com/newsletter_images/2015_February/camera512x512+(1).png'}}
                  />
                </TouchableHighlight>
              )<commit_msg>(code refactr) Corected minor syntax/format incongruity<commit_after>import React, { Component } from 'react';
import {
  Text,
  View,
  Image,
  TouchableHighlight,
  TouchableOpacity,
  Switch
} from 'react-native';
import styles from '../styles.ios.js';
import Nav from './Navbar.ios.js';
import SearchBar from './Searchbar.ios.js';
import { connect } from "react-redux";
import {bindActionCreators} from 'redux';
import * as app from '../actions/appActions.ios.js';
import getApp from '../reducers/appReducers.ios.js';
import camera from './Camera.ios.js';
import FacebookLogin from './FacebookLogin.ios.js';

class App extends Component {
  constructor(props) {
    super(props);
  }

  border(color) {
    return {
      borderColor: color,
      borderWidth: 5,
    }
  }

  changeNavigationHome() {
    this.props.navigator.push({
      id: 'Home'
    })
  }

  changeNavigationCamera() {
    this.props.navigator.push({
      component: camera,
      passProps: { store: this.props.store }
    })
  }

  rendering() {
    actions.rendering();
    this.forceUpdate()
  }
  render() {
    const {state, actions} = this.props;
    if (state.rendering) {
      return (
        <Image 
          source= {{uri: 'https://media.blueapron.com/assets/loader/pot-loader-6047abec2ec57c18d848f623c036f7fe80236dce689bb48279036c4f914d0c9e.gif'}}
          style = {styles.loadingGif}
        />
      )
    }
    return (
      <View style={[styles.container]}>
        <View style={[styles.navigation]} >
          <Nav
            changeNavigationCamera={this.changeNavigationCamera.bind(this)}
          />
        </View>
        <View style={styles.app} >
          <Image style={styles.welcomeImage} source={require('../public/snacktimewelcome.jpg')}/>
          <FacebookLogin />
        </View>
        { /* conditional camera / search bar render */
          state.showSearchBar
            ? 
              (
                <View style={[styles.searchBarPictureFrame]} >
                  <SearchBar store={this.props.store}
                             navigator={this.props.navigator}
                             rendering={actions.rendering}
                             lagOut={actions.laggedOut} 
                             isRendering={state.rendering}
                  />
                </View>
              )
            : 
              (
                <TouchableHighlight style={[styles.buttonView]} 
                                    onPress={this.changeNavigationCamera.bind(this)}
                >
                  <Image 
                    style={[styles.takePicture]}
                    source={{uri: 'https://s3.amazonaws.com/features.ifttt.com/newsletter_images/2015_February/camera512x512+(1).png'}}
                  />
                </TouchableHighlight>
              )
{'fraction_non_alphanumeric': 0.12618919404056722, 'fraction_numerical': 0.01938610662358643, 'mean_word_length': 1.822695035460993, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4080534', 'n_tokens_mistral': 1685, 'n_tokens_neox': 1577, 'n_words': 263}