Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var React = require("react");
var Link = require("react-router").Link;
var Navbar = require("react-bootstrap").Navbar;
var Nav = require("react-bootstrap").Nav;
var NavItem = require("react-bootstrap").NavItem;
var SessionStore = require("../../stores/session_store");
var LoggedIn = require("./logged_in");
var LoggedOut = require("./logged_out");
var Search = require("../search/search");
var History = require("react-router").History;
module.exports = React.createClass({
mixins: [History],
getInitialState: function () {
return this.getStateFromStore();
},
getStateFromStore: function () {
return {
isLoggedIn: SessionStore.isLoggedIn(),
var React = require('react');
var ReactCSSTransitionGroup = require('react-addons-css-transition-group');
var MiniProfile = require("../common/MiniProfile.js");
var ProfileBoard = require("../common/ProfileBoard.js");
var SetIntervalMixin = require("../common/SetIntervalMixin.js");
var StreamMixin = require("../common/StreamMixin.js");
var SafeStateChangeMixin = require('../common/SafeStateChangeMixin.js');
var EventListenerMixin = require('../common/EventListenerMixin.js');
var AppSettingsMixin = require('../common/AppSettingsMixin.js');
var ReactBootstrap = require('react-bootstrap')
, NavItem = ReactBootstrap.NavItem
, Nav = ReactBootstrap.Nav
, ListGroup = ReactBootstrap.ListGroup
, ListGroupItem = ReactBootstrap.ListGroupItem
, Panel = ReactBootstrap.Panel
, Glyphicon = ReactBootstrap.Glyphicon
, Button = ReactBootstrap.Button
module.exports = Followings = React.createClass({
mixins: [AppSettingsMixin,SetIntervalMixin,SafeStateChangeMixin],
getInitialState: function() {
return {
username: (this.props.params.username ? this.props.params.username : this.props.activeAccount),
followings: [],
loading: true
};
value: function render() {
return _react2.default.createElement(
_reactBootstrap.NavItem,
{ onClick: this.open },
'Login',
_react2.default.createElement(
_reactBootstrap.Modal,
{ show: this.state.showModal, onHide: this.close },
_react2.default.createElement(
_reactBootstrap.Modal.Header,
{ closeButton: true },
_react2.default.createElement(
_reactBootstrap.Modal.Title,
null,
'Login Here!'
)
),
_react2.default.createElement(
_reactBootstrap.Modal.Body,
_reactRouter.Link,
{ to: '/home' },
'Scaphold'
)
)
),
_react2.default.createElement(
_reactBootstrap.Nav,
{ pullRight: true },
_react2.default.createElement(
_reactBootstrap.NavItem,
{ onClick: this.goHome },
'Home'
),
_react2.default.createElement(
_reactBootstrap.NavItem,
{ onClick: this.goToGraphiQL },
'GraphiQL'
),
_react2.default.createElement(
_reactBootstrap.NavItem,
null,
loggedInUser
),
_react2.default.createElement(_Logout2.default, null)
)
);
}
}]);
null,
React.createElement(
_reactBootstrap.Navbar.Brand,
null,
React.createElement(
'a',
{ href: '#' },
React.createElement('img', { className: 'logo', src: 'wave.svg' })
)
)
),
React.createElement(
_reactBootstrap.Nav,
null,
React.createElement(
_reactBootstrap.NavItem,
{ eventKey: 1, href: '#' },
'Visualize'
),
React.createElement(
_reactBootstrap.NavItem,
{ eventKey: 2, href: '#' },
'Report',
React.createElement(
_reactBootstrap.Badge,
{ className: 'report-count', pullRight: true },
'42'
)
),
React.createElement(
_reactBootstrap.NavItem,
{ eventKey: 3, href: '#' },
var ReactBootstrap = require('react-bootstrap')
, NavItem = ReactBootstrap.NavItem
, Nav = ReactBootstrap.Nav
, ListGroup = ReactBootstrap.ListGroup
, ListGroupItem = ReactBootstrap.ListGroupItem
, Panel = ReactBootstrap.Panel
, Glyphicon = ReactBootstrap.Glyphicon
, Button = ReactBootstrap.Button
var React = require('react/addons');
var ReactCSSTransitionGroup = React.addons.CSSTransitionGroup;
var Post = require("./Post.js");
module.exports = Postboard = React.createClass({
render: function() {
var posts = this.props.data.map(function(post, index) {
if (localStorage.getItem("HCAccount") == "manager") {
userCenter = React.createElement(react_bootstrap_1.NavItem, { eventKey: 1, href: "/usercenter" }, "\u4E2A\u4EBA\u4E2D\u5FC3");
}
return React.createElement("div", null,
React.createElement(react_bootstrap_1.Navbar, { inverse: true, collapseOnSelect: true },
React.createElement(react_bootstrap_1.Navbar.Header, null,
React.createElement(react_bootstrap_1.Navbar.Brand, null,
React.createElement("a", { href: "/" }, "\u7B80\u5386\u9A8C\u8BC1\u5E73\u53F0")),
React.createElement(react_bootstrap_1.Navbar.Toggle, null)),
React.createElement(react_bootstrap_1.Navbar.Collapse, null,
React.createElement(react_bootstrap_1.Nav, null,
React.createElement(react_bootstrap_1.NavItem, { eventKey: 1, href: "/myresume" }, "\u6211\u7684\u7B80\u5386"),
React.createElement(react_bootstrap_1.NavItem, { eventKey: 2, href: "/verify" }, "\u9A8C\u8BC1\u7B80\u5386")),
React.createElement(react_bootstrap_1.Nav, { pullRight: true },
userCenter,
React.createElement(react_bootstrap_1.NavItem, { eventKey: 2, href: isLogin ? "/logout" : "/login" }, isLogin ? name + "/注销" : "登录")))));
};
return Header;
_react2['default'].createElement(
_reactRouterBootstrap.LinkContainer,
{ to: '/three.js/lesson1' },
_react2['default'].createElement(
_reactBootstrap.NavItem,
null,
'Lesson 1'
)
)
)
),
_react2['default'].createElement(
_reactBootstrap.Nav,
{ pullRight: true },
_react2['default'].createElement(
_reactBootstrap.NavItem,
{ eventKey: 2, href: '//github.com/luqin/systemjs-es6-demos', target: '_blank' },
'GitHub'
)
)
)
),
this.props.children
);
}
}], [{
'SystemJS ES6 Demos'
)
),
_react2['default'].createElement(_reactBootstrap.Navbar.Toggle, null)
),
_react2['default'].createElement(
_reactBootstrap.Navbar.Collapse,
null,
_react2['default'].createElement(
_reactBootstrap.Nav,
null,
_react2['default'].createElement(
_reactRouterBootstrap.LinkContainer,
{ to: '/echarts/word-cloud' },
_react2['default'].createElement(
_reactBootstrap.NavItem,
null,
'ECharts'
)
),
_react2['default'].createElement(
_reactBootstrap.NavDropdown,
{ eventKey: 3, title: 'three.js', id: 'threejs-nav-dropdown' },
_react2['default'].createElement(
_reactRouterBootstrap.LinkContainer,
{ to: '/three.js/hello-world' },
_react2['default'].createElement(
_reactBootstrap.NavItem,
null,
'Hello World'
)
),
'a',
{ href: '#' },
React.createElement('img', { className: 'logo', src: 'wave.svg' })
)
)
),
React.createElement(
_reactBootstrap.Nav,
null,
React.createElement(
_reactBootstrap.NavItem,
{ eventKey: 1, href: '#' },
'Visualize'
),
React.createElement(
_reactBootstrap.NavItem,
{ eventKey: 2, href: '#' },
'Report',
React.createElement(
_reactBootstrap.Badge,
{ className: 'report-count', pullRight: true },
'42'
)
),
React.createElement(
_reactBootstrap.NavItem,
{ eventKey: 3, href: '#' },
'Investigate'
)
),
React.createElement(
_reactBootstrap.Nav,