<commit_before>import React from 'react';
import {Link} from 'react-router'
import auth from '../../utils/auth.jsx'

export default class NavLinks extends React.Component {
	handleClick(e){
		$('.active').removeClass('active')
		e.target.className = 'active';
	}
	render(){
		return (
			<div>
				<li onClick={this.handleClick.bind(this)}><Link to="/">Home</Link></li>
				{if (auth.loggedIn()){}
					<LoggedIn handleClick={this.handleClick} />
				{}} else {}
					<NotLoggedIn handleClick={this.handleClick} />
				{}}
			</div>
		)
	}
}

class NotLoggedIn extends React.Component { 
	render(){
		return(
			<div>
				<li onClick={this.props.handleClick}><Link to="/users/new">Sign Up</Link></li>
				<li onClick={this.props.handleClick}><Link to="/serfs/new">Become A Serf</Link></li>
				<li onClick={this.props.handleClick}><Link to="/sessions/new">Log In</Link></li>
			</div>
		)
	}
}


class LoggedIn extends React.Component {
	render(){
		return(
			<div>
				<li onClick={auth.logout()}><Link to="/">
					Log Out</Link>
				</li>
			</div>
		)
	}
} <commit_msg>Add proper formatting for nav links<commit_after>import React from 'react';
import {Link} from 'react-router'
import auth from '../../utils/auth.jsx'

export default class NavLinks extends React.Component {
	handleClick(e){
		$('.active').removeClass('active')
		e.target.className = 'active';
	}
	render(){
		if (auth.loggedIn()){
			return <LoggedIn handleClick={this.handleClick} />
		} else {
			return <NotLoggedIn handleClick={this.handleClick} />
		}
	}
}						

						

class NotLoggedIn extends React.Component { 
	render(){
		return(
			<ul className="nav navbar-nav">
				<li onClick={this.props.handleClick}><Link to="/">Home</Link></li>
				<li onClick={this.props.handleClick}><Link to="/users/new">Sign Up</Link></li>
				<li onClick={this.props.handleClick}><Link to="/serfs/new">Become A Serf</Link></li>
				<li onClick={this.props.handleClick}><Link to="/sessions/new">Log In</Link></li>
			</ul>
		)
	}
}


class LoggedIn extends React.Component {
	render(){
		return(
			<ul className="nav navbar-nav">
				<li onClick={this.handleClick}><Link to="/">Home</Link></li>
				<li onClick={auth.logout}><Link to="/">
					Log Out</Link>
				</li>
			</ul>
		)
	}
} 
{'fraction_non_alphanumeric': 0.1942350332594235, 'fraction_numerical': 0.0, 'mean_word_length': 3.5760649087221097, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 61, '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': '7376000', 'n_tokens_mistral': 903, 'n_tokens_neox': 787, 'n_words': 153}