{"size": 844, "ext": "js", "max_stars_repo_path": "js/components/Nav.react.js", "max_stars_repo_name": "guotie/navapp", "max_stars_repo_stars_event_min_datetime": "2015-01-19T03:52:51.000Z", "max_stars_repo_stars_event_max_datetime": "2015-11-16T08:43:54.000Z", "max_issues_repo_path": "js/components/Nav.react.js", "max_issues_repo_name": "guotie/navapp", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "js/components/Nav.react.js", "max_forks_repo_name": "guotie/navapp", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 6, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.2105263158, "max_line_length": 64, "alphanum_fraction": 0.6101895735}
var React = require('react'),
	Router = require('react-router'),
	Link = Router.Link;

var _tabs = require('../constants/NavtabConstants');

var Index = require('./TabIndex.react'),
	Group = require('./TabGroup.react'),
	Forum = require('./TabForum.react'),
	My = require('./TabMy.react');

var Nav = React.createClass({
	getInitialState: function() {
		return {slug: this.props.activeSlug};
	},

	render: function() {
		var self = this;
		var tabitems = _tabs.map(function(tab) {
      		return (
      		<Link to={tab.slug} className='tab-item' key={tab.slug}>
				<span className={tab.icon}></span>
        		<span className='tab-label'>{tab.name}</span>
        	</Link>
        	)
    	});

		return (
			<div>
			<this.props.activeRouteHandler/>
			<nav className='bar bar-tab'>{tabitems}</nav>
			</div>
		)
	}
})

module.exports = Nav;
