<commit_before>import React from 'react'
import {Route, RouteHandler, Link, Button} from 'react-router'

class Profile extends React.Component {
  constructor(props){
    super(props);
    this.state = {
      teacherData: {
        name: '<NAME>',
        email: '<EMAIL>'
      }
    };
  }

  render(){
    return(
      <div>
        <h2 className='sectionHeading'>Settings</h2>
        <div className='profile' style={{marginLeft: '20%'}}>
          
          <div >
            <span>Name: </span><span>{this.state.teacherData.name}</span>
          </div>
          
          <div>
            <span>Email: </span><span>{this.state.teacherData.email}</span>
          </div>

          <li onClick={()=>{ auth.logout();
          }}>
          </li>
        </div>
        <button style={{marginLeft: '20%'}}>Logout</button>
      </div>
    )
  }
}


module.exports = Profile;<commit_msg>Add functionality to logout button<commit_after>import React from 'react'
import {Route, RouteHandler, Link, Button} from 'react-router'
var auth = require('./../utils/auth');

class Profile extends React.Component {
  constructor(props){
    super(props);
    this.state = {
      teacherData: {
        name: '<NAME>',
        email: '<EMAIL>'
      }
    };
  }

  handleLogout() {
    auth.logout();
    this.context.router.push({
      pathname: '/login'
    });
  }

  render(){
    return(
      <div>
        <h2 className='sectionHeading'>Settings</h2>
        <div className='profile' style={{marginLeft: '20%'}}>
          
          <div >
            <span>Name: </span><span>{this.state.teacherData.name}</span>
          </div>
          
          <div>
            <span>Email: </span><span>{this.state.teacherData.email}</span>
          </div>
          <li onClick={this.handleLogout.bind(this)}>
          </li>
        </div>
        <button style={{marginLeft: '20%'}}>Logout</button>
      </div>
    )
  }
}

Profile.contextTypes = {
  router: React.PropTypes.any.isRequired
};

module.exports = Profile;
{'fraction_non_alphanumeric': 0.1702022693635915, 'fraction_numerical': 0.0059200789343857915, 'mean_word_length': 2.0588235294117645, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 52, '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': '2875847', 'n_tokens_mistral': 643, 'n_tokens_neox': 641, 'n_words': 115}