"use strict"; var UserLogin = React.createClass({ authorizeId: function (id) { socket.emit("users:authorize", { id: parseInt(id, 10) }); setTimeout(function () { socket.emit("gather:refresh"); }, 1000); }, handleSubmit: function (e) { e.preventDefault(); var id = React.findDOMNode(this.refs.authorize_id).value.trim(); if (!id) return; React.findDOMNode(this.refs.authorize_id).value = ''; this.authorizeId(id); }, render: function () { return (
); } }) var UserMenu = React.createClass({ getDefaultProps: function () { return { users: [] }; }, componentDidMount: function () { var self = this; socket.on('users:update', function (data) { self.setProps({ users: data.users }); }); }, render: function () { var users = this.props.users.map(function (user) { return (