var React = require('react');
var Glyphicon = require('react-bootstrap/lib/Glyphicon');
var Nav = require('react-bootstrap/lib/Nav');
var NavItem = require('react-bootstrap/lib/NavItem');
var Navbar = require('react-bootstrap/lib/Navbar');
var NavDropdown = require('react-bootstrap/lib/NavDropdown');
var MenuItem = require('react-bootstrap/lib/MenuItem');
var Button = require('react-bootstrap/lib/Button');
var Input = require('react-bootstrap/lib/Input');
var MenuStore = require('../stores/MenuStore');
JarrNavBar = React.createClass({
getInitialState: function() {
return {is_admin: MenuStore._datas.is_admin,
crawling_method: MenuStore._datas.crawling_method};
},
buttonFetch: function() {
if(this.state.is_admin && this.state.crawling_method != 'http') {
return Fetch;
}
},
buttonAdmin: function() {
if(this.state.is_admin) {
return (}
id='admin-dropdown'>
);
}
},
render: function() {
var gl_title = (
Add a new feed
);
return (
JARR
);
},
componentDidMount: function() {
MenuStore.addChangeListener(this._onChange);
},
componentWillUnmount: function() {
MenuStore.removeChangeListener(this._onChange);
},
_onChange: function() {
var datas = MenuStore.getAll();
this.setState({is_admin: datas.is_admin,
crawling_method: datas.crawling_method});
},
});
module.exports = JarrNavBar;