]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/components/users/Profile.js
technique chapters
[alttp.git] / resources / js / components / users / Profile.js
index e2fe2e790be5e3739a52da8e266d0212b8937ac8..a8a4e95143d40891dc631835249403d6621644b8 100644 (file)
@@ -5,13 +5,18 @@ import { withTranslation } from 'react-i18next';
 
 import Box from './Box';
 import Records from './Records';
+import EditNicknameButton from './EditNicknameButton';
 import EditStreamLinkButton from './EditStreamLinkButton';
 import Participation from './Participation';
 import Icon from '../common/Icon';
 import i18n from '../../i18n';
 
 const Profile = ({ user }) => <Container>
-       <h1>{user.username}</h1>
+       <h1>
+               {user.nickname || user.username}
+               {' '}
+               <EditNicknameButton user={user} />
+       </h1>
        <Row>
                <Col md={6} className="mb-5">
                        <h2>{i18n.t('users.discordTag')}</h2>
@@ -62,6 +67,7 @@ const Profile = ({ user }) => <Container>
 
 Profile.propTypes = {
        user: PropTypes.shape({
+               nickname: PropTypes.string,
                participation: PropTypes.arrayOf(PropTypes.shape({
                })),
                round_first_count: PropTypes.number,