const React = require("react"); import {MenubarMixin} from "javascripts/components/menubar"; const UserLogin = React.createClass({ propTypes: { socket: React.PropTypes.object.isRequired }, getInitialState() { return { userId: null }; }, handleChange(e) { const newId = e.target.value || null; this.setState({ userId: newId }); }, authorizeId(id) { this.props.socket.emit("users:authorize", { id: id }); }, handleSubmit(e) { e.preventDefault(); this.authorizeId(this.state.userId); }, render() { return (
); } }); const AdminPanel = exports.AdminPanel = React.createClass({ mixins: [MenubarMixin], propTypes: { socket: React.PropTypes.object.isRequired }, handleGatherReset() { this.props.socket.emit("gather:reset"); }, render() { return (