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