<commit_before>import React from 'react';
import { Link } from 'react-router';
import { connect } from 'react-redux';
import { logout } from '../../actions/loginActions';

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

  logout(event) {
    event.preventDefault();
    this.context.router.push('/');
    this.props.logout();
  }

  render() {
    const { isAuthenticated, user } = this.props.login;
    const userLinks = (
      <div>
        <ul id="dropdown1" className="dropdown-content">
          <li>
            <Link to="#">
              my-docs
              <i className="material-icons right">perm_media</i>
            </Link>
          </li>
          <li>
            <Link to="#">
              Profile
              <i className="material-icons right">account_circle</i>
            </Link>
          </li>
          <li className="divider" />
          <li>
            <a href="#" onClick={this.logout}>
              Logout
              <i className="material-icons right">power_settings_new</i>
            </a>
          </li>
        </ul>
        <ul className="nav navbar-nav navbar-right">
          <li>
            <Link to="create-document">
              Create Document
              <i className="material-icons right">add</i>
            </Link>
          </li>
          <li>
            <a className="dropdown-button" href="#!" data-activates="dropdown1">
              {user && `Welcome, ${user.username}`}
              <i className="material-icons right">
                arrow_drop_down
              </i>
            </a>
          </li>
        </ul>
       </div>
    );
    const guestLinks = (
      <ul className="nav navbar-nav navbar-right">
        <li>
           <Link to="/signup">
            Sign up
            <i className="material-icons right">exit_to_app</i>
           </Link>
        </li>
         <li>
           <Link to="/login">
             login
             <i className="material-icons right">trending_flat</i>
           </Link><commit_msg>feature(NavigationBar.jsx) add link to dashboard on navbar<commit_after>import React from 'react';
import { Link } from 'react-router';
import { connect } from 'react-redux';
import { logout } from '../../actions/loginActions';

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

  logout(event) {
    event.preventDefault();
    this.context.router.push('/');
    this.props.logout();
  }

  render() {
    const { isAuthenticated, user } = this.props.login;
    const userLinks = (
      <div>
        <ul id="dropdown1" className="dropdown-content">
          <li>
            <Link to="#">
              my-docs
              <i className="material-icons right">perm_media</i>
            </Link>
          </li>
          <li>
            <Link to="#">
              Profile
              <i className="material-icons right">account_circle</i>
            </Link>
          </li>
          <li className="divider" />
          <li>
            <a href="#" onClick={this.logout}>
              Logout
              <i className="material-icons right">power_settings_new</i>
            </a>
          </li>
        </ul>
        <ul className="nav navbar-nav navbar-right">
          <li>
            <Link to="dashboard">
              Dashboard
              <i className="material-icons right">view_module</i>
            </Link>
          </li>
          <li>
            <a className="dropdown-button" href="#!" data-activates="dropdown1">
              {user && `Welcome, ${user.username}`}
              <i className="material-icons right">
                arrow_drop_down
              </i>
            </a>
          </li>
        </ul>
       </div>
    );
    const guestLinks = (
      <ul className="nav navbar-nav navbar-right">
        <li>
           <Link to="/signup">
            Sign up
            <i className="material-icons right">exit_to_app</i>
           </Link>
        </li>
         <li>
           <Link to="/login">
             login
             <i className="material-icons right">trending_flat</i>
           </Link>
{'fraction_non_alphanumeric': 0.14538588624026433, 'fraction_numerical': 0.0009440641963653528, 'mean_word_length': 1.5377245508982036, 'pattern_counts': {'":': 0, '<': 101, '<?xml version=': 0, '>': 101, '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': '2000955', 'n_tokens_mistral': 1201, 'n_tokens_neox': 1193, 'n_words': 254}