X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Fusers%2FProfile.js;h=b4c40605abbdb06e0027e966d9e00b89c7d53a22;hb=b5a50d74cf042fa7fc874d8184dc37ae20bb74dd;hp=e2fe2e790be5e3739a52da8e266d0212b8937ac8;hpb=2ab05ab7927e8b21887ffa42d04eb9d4ff899382;p=alttp.git diff --git a/resources/js/components/users/Profile.js b/resources/js/components/users/Profile.js index e2fe2e7..b4c4060 100644 --- a/resources/js/components/users/Profile.js +++ b/resources/js/components/users/Profile.js @@ -1,17 +1,29 @@ import PropTypes from 'prop-types'; import React from 'react'; -import { Button, Col, Container, Row } from 'react-bootstrap'; +import { Alert, Button, Col, Container, Row } from 'react-bootstrap'; 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 }) => -

{user.username}

+

+ {user.nickname || user.username} + {' '} + +

+ {user.random_quote && user.random_quote.comment ? + +
+ {user.random_quote.comment} +
+
+ : null}

{i18n.t('users.discordTag')}

@@ -62,8 +74,12 @@ const Profile = ({ user }) => Profile.propTypes = { user: PropTypes.shape({ + nickname: PropTypes.string, participation: PropTypes.arrayOf(PropTypes.shape({ })), + random_quote: PropTypes.shape({ + comment: PropTypes.string, + }), round_first_count: PropTypes.number, round_second_count: PropTypes.number, round_third_count: PropTypes.number,