<commit_before>'use strict';

import React, {
  AsyncStorage,
  ListView,
  StyleSheet,
  Text,
  TextInput,
  View
} from 'react-native';
import { connect } from 'react-redux'
import { authActions } from 'goommerce-redux';
import OneSignal from 'react-native-onesignal';

import Signin from '../components/Signin';

import routes from '../routes';

const _ = require('lodash');

const Home = React.createClass({
  getInitialState() {
    return {};
  },
  componentDidMount() {
    const { auth, whoami } = this.props;
    if (auth.bearer && !auth.email) {
      whoami();
    }
  },
  signin(email, password) {
    OneSignal.idsAvailable(({ pushToken, playerId, userId }) => {
      this.props.login(email, password, pushToken && (playerId || userId)).then(
        (auth) => AsyncStorage.setItem('bearer', auth.bearer)
      );
    });
  },
  render() {
    const { auth: { bearer, roles, email }, push } = this.props;
    if (!bearer) {
      return (<Signin signin={this.signin} />);
    }

    const brands = _.filter(roles,
      (r) => r.type === 'owner' || r.type === 'staff').map((r) => r.brand);
    return (
      <View style={styles.container}>
        <Text>{email}</Text>
        {brands.map((b, idx) => (
          <View key={idx}>
            <Text onPress={() => push(routes.stats({ brandId: b.id }))}>
              {b.id}
            </Text>
            <Text onPress={() => push(routes.list({ brandId: b.id }))}>
              New Orders
            </Text>
          </View>
        ))}
      </View>
    );
  }
});
<commit_msg>chages order stats link text<commit_after>'use strict';

import React, {
  AsyncStorage,
  ListView,
  StyleSheet,
  Text,
  TextInput,
  View
} from 'react-native';
import { connect } from 'react-redux'
import { authActions } from 'goommerce-redux';
import OneSignal from 'react-native-onesignal';

import Signin from '../components/Signin';

import routes from '../routes';

const _ = require('lodash');

const Home = React.createClass({
  getInitialState() {
    return {};
  },
  componentDidMount() {
    const { auth, whoami } = this.props;
    if (auth.bearer && !auth.email) {
      whoami();
    }
  },
  signin(email, password) {
    OneSignal.idsAvailable(({ pushToken, playerId, userId }) => {
      this.props.login(email, password, pushToken && (playerId || userId)).then(
        (auth) => AsyncStorage.setItem('bearer', auth.bearer)
      );
    });
  },
  render() {
    const { auth: { bearer, roles, email }, push } = this.props;
    if (!bearer) {
      return (<Signin signin={this.signin} />);
    }

    const brands = _.filter(roles,
      (r) => r.type === 'owner' || r.type === 'staff').map((r) => r.brand);
    return (
      <View style={styles.container}>
        <Text>{email}</Text>
        {brands.map((b, idx) => (
          <View key={idx}>
            <Text onPress={() => push(routes.stats({ brandId: b.id }))}>
              Order Stats
            </Text>
            <Text onPress={() => push(routes.list({ brandId: b.id }))}>
              New Orders
            </Text>
          </View>
        ))}
      </View>
    );
  }
});

{'fraction_non_alphanumeric': 0.18108974358974358, 'fraction_numerical': 0.0, 'mean_word_length': 2.38136511375948, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 39, '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': '7176068', 'n_tokens_mistral': 1020, 'n_tokens_neox': 1022, 'n_words': 223}