<commit_before>import React, {Component} from 'react'
import {NavLink} from 'react-router-dom'
import {connect} from 'react-redux'
import {bindActionCreators} from 'redux'

import * as sessionsActions from '../actions/sessionsActions'
import Auth from '../auth/authenticator'
import '../styles/Navbar.css'




class Navbar extends Component {
  constructor(props) {
    super();
    this.logout = this.logout.bind(this)
  }

  logout(event) {
    event.preventDefault();
    this.props.actions.logOutUser();
  }

  render() {
    if (this.props.auth.isAuthenticated) {
      return (
        <nav className="navbar">
            <NavLink
              className="navlink"
              to="/newsfeed"
            >Home</NavLink>
            <NavLink
              className="navlink"
              to="/sources"
            >Sources</NavLink>
            <a href="#"
              className="navlink"
              onClick={(e) => {this.logout(e)}}
            >Logout</a>
        </nav>
      )
    } else {
      return (
        <nav className="navbar">
            <NavLink
              className="navlink"
              to="/"
            >Home</NavLink>
            <NavLink
              className="navlink"
              to="/sources"
            >Sources</NavLink>
        </nav>
      )
    }
  }


}

const mapStateToProps = (state) => {
  return {auth: state.auth}
}

const mapDispatchToProps = (dispatch) => {
  return {actions: bindActionCreators(sessionsActions, dispatch)}
}
export default connect(mapStateToProps, mapDispatchToProps)(Navbar)<commit_msg>Change NavBar links<commit_after>import React, {Component} from 'react'
import {NavLink} from 'react-router-dom'
import {connect} from 'react-redux'
import {bindActionCreators} from 'redux'

import * as sessionsActions from '../actions/sessionsActions'
import Auth from '../auth/authenticator'
import '../styles/Navbar.css'




class Navbar extends Component {
  constructor(props) {
    super();
    this.logout = this.logout.bind(this)
  }

  logout(event) {
    event.preventDefault();
    this.props.actions.logOutUser();
  }

  render() {
    if (this.props.auth.isAuthenticated) {
      return (
        <nav className="navbar">
            <NavLink
              className="navlink"
              to="/newsfeed"
            >Newsfeed</NavLink>
            <NavLink
              className="navlink"
              to="/sources"
            >Sources</NavLink>
            <a href="#"
              className="navlink"
              onClick={(e) => {this.logout(e)}}
            >Logout</a>
        </nav>
      )
    } else {
      return (
        <nav className="navbar">
            <NavLink
              className="navlink"
              to="/"
            >Login</NavLink>
            <NavLink
              className="navlink"
              to="/signup"
            >Sign Up</NavLink>
        </nav>
      )
    }
  }


}

const mapStateToProps = (state) => {
  return {auth: state.auth}
}

const mapDispatchToProps = (dispatch) => {
  return {actions: bindActionCreators(sessionsActions, dispatch)}
}
export default connect(mapStateToProps, mapDispatchToProps)(Navbar)
{'fraction_non_alphanumeric': 0.13071065989847716, 'fraction_numerical': 0.0, 'mean_word_length': 1.9857954545454546, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 37, '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': '3721736', 'n_tokens_mistral': 927, 'n_tokens_neox': 911, 'n_words': 182}