import React, { Component } from 'react'; import { FormattedMessage as Message, FormattedRelative as Relative } from 'react-intl'; import { Link } from 'react-router-dom'; import Helmet from 'react-helmet'; import { userShape } from 'components/user/User'; import { LangMenu } from 'components/langMenu'; import langMenuMessages from 'components/langMenu/langMenu.intl.json'; import ProfileField from './ProfileField'; import styles from './profile.scss'; import profileForm from './profileForm.scss'; import messages from './Profile.intl.json'; import RulesPage from 'pages/rules/RulesPage'; class Profile extends Component { static displayName = 'Profile'; static propTypes = { user: userShape }; render() { const { user } = this.props; return (
{(pageTitle) => (

{pageTitle}

)}

} value={user.username} warningMessage={user.hasMojangUsernameCollision ? ( ) }} /> ) : ''} /> } value={) }} />} /> } value={} /> } value={user.isOtpEnabled ? ( ) : ( )} /> {user.uuid} } />
); } handleUUIDMouseOver() { try { const selection = window.getSelection(); const range = document.createRange(); range.selectNodeContents(this.UUID); selection.removeAllRanges(); selection.addRange(range); } catch (err) { // the browser does not support an API } } setUUID(el) { this.UUID = el; } } import { connect } from 'react-redux'; export default connect((state) => ({ user: state.user }))(Profile);