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


export default class SocialAccounts extends Component {
  render() {
    let [fbook,google,pay] = [this.props.userInfo.facebook,this.props.userInfo.google,this.props.userInfo.paypal];
    let id = this.props.userInfo.id;
    let primary = this.props.userInfo.primary;
    
    return(
      <div style={{float:'right'}}>
          {fbook || google || pay  ?
            <div>
              <h5>Social Connections</h5>
                <span>
                  {fbook && primary !== 'facebook' ? 
                      <button className="button info button tiny" onClick={()=>this.props.unlinkSocialAcc({id:id,facebook:0,provider:'facebook'})}><i className="fa fa-lock"></i>Facebook</button>
                      : fbook && primary === 'facebook' ? <div>Primary Account: {primary}</div> : <span></span>}
                  {google && primary !== 'google' ?
                      <button className="button info button tiny" onClick={()=>this.props.unlinkSocialAcc({id:id,facebook:0,provider:'facebook'})}><i className="fa fa-lock"></i>Google+</button>
                      : google && primary === 'google' ? <div>Primary Account: {primary}</div> : <span></span>}
                  {pay && primary !== 'paypal' ?
                      <button className="button info button tiny" onClick={()=>this.props.unlinkSocialAcc({id:id,facebook:0,provider:'facebook'})}><i className="fa fa-lock"></i>PayPal</button>
                      : google && primary === 'paypal' ? <div>Primary Account: {primary}</div> : <span></span>}
                </span>
            </div>
            :<span></span>}
          {!fbook || !google || !pay ?
              <div>
                <h5>Link Accounts</h5>
                  <span>
                    {!fbook ? 
                        <a href='auth/facebook' className="button alert button tiny"><i className="fa fa-unlock"></i>Facebook</a>
                      :<span></span>}
                    {!google ? 
                        <a href='auth/google' className="button alert button tiny"><i className="fa fa-unlock"></i>Google+</a><commit_msg>fix primary account<commit_after>import React, { Component, PropTypes } from 'react';


export default class SocialAccounts extends Component {
  render() {
    let [fbook,google,pay] = [this.props.userInfo.facebook,this.props.userInfo.google,this.props.userInfo.paypal];
    let id = this.props.userInfo.id;
    let primary = this.props.userInfo.primary;
    
    return(
      <div style={{float:'right'}}>
          {fbook || google || pay  ?
            <div>
              <h5>Social Connections</h5>
                <span>
                  {fbook && primary !== 'Facebook' ? 
                      <button className="button info button tiny" onClick={()=>this.props.unlinkSocialAcc({id:id,facebook:0,provider:'facebook'})}><i className="fa fa-lock"></i>Facebook</button>
                      : fbook && primary === 'Facebook' ? <div>Primary Account: {primary}</div> : <span></span>}
                  {google && primary !== 'Google' ?
                      <button className="button info button tiny" onClick={()=>this.props.unlinkSocialAcc({id:id,facebook:0,provider:'facebook'})}><i className="fa fa-lock"></i>Google+</button>
                      : google && primary === 'Google' ? <div>Primary Account: {primary}</div> : <span></span>}
                  {pay && primary !== 'Paypal' ?
                      <button className="button info button tiny" onClick={()=>this.props.unlinkSocialAcc({id:id,facebook:0,provider:'facebook'})}><i className="fa fa-lock"></i>PayPal</button>
                      : google && primary === 'Paypal' ? <div>Primary Account: {primary}</div> : <span></span>}
                </span>
            </div>
            :<span></span>}
          {!fbook || !google || !pay ?
              <div>
                <h5>Link Accounts</h5>
                  <span>
                    {!fbook ? 
                        <a href='auth/facebook' className="button alert button tiny"><i className="fa fa-unlock"></i>Facebook</a>
                      :<span></span>}
                    {!google ? 
                        <a href='auth/google' className="button alert button tiny"><i className="fa fa-unlock"></i>Google+</a>
{'fraction_non_alphanumeric': 0.1706183170618317, 'fraction_numerical': 0.0032543003254300326, 'mean_word_length': 2.138584974471189, 'pattern_counts': {'":': 0, '<': 97, '<?xml version=': 0, '>': 103, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4114834', 'n_tokens_mistral': 1212, 'n_tokens_neox': 1163, 'n_words': 231}