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

class Header extends Component{
    render(){
        return(
            <nav>
                <div className="nav-wrapper">
                    <a className="left brand-logo">
                        Emaily
                    </a>
                    <ul className="right">
                        <li>
                            <a>Login with Google</a>
                        </li>
                    </ul>
                </div>
            </nav>
        )
    }
}

export default Header;<commit_msg>modifying header content based on user state<commit_after>import React,{Component} from 'react'
import {connect} from 'react-redux'

class Header extends Component{
    renderContent(){
        switch(this.props.auth){
            case null:
                return( <div className="preloader-wrapper active">
                <div className="spinner-layer spinner-red-only">
                  <div className="circle-clipper left">
                    <div className="circle"></div>
                  </div><div className="gap-patch">
                    <div className="circle"></div>
                  </div><div className="circle-clipper right">
                    <div className="circle"></div>
                  </div>
                </div>
              </div>)
            case false:
                return <li><a href="/auth/google">Click to Login with Google</a></li>
            default:
                return <li><a>Logout</a></li>
        }

    }
    render(){
        return(
            <nav>
                <div className="nav-wrapper">
                    <a className="left brand-logo">
                        Emaily
                    </a>
                    <ul className="right">
                       {this.renderContent()}
                    </ul>
                </div>
            </nav>
        )
    }
}

function mapStateToProps({ auth }) {   
      return { auth };   
    }
    
export default connect(mapStateToProps)(Header);
{'fraction_non_alphanumeric': 0.11828486939379004, 'fraction_numerical': 0.0, 'mean_word_length': 1.1527041357370096, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, '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': '5144263', 'n_tokens_mistral': 508, 'n_tokens_neox': 475, 'n_words': 112}