X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Fusers%2FProfile.js;h=b4c40605abbdb06e0027e966d9e00b89c7d53a22;hb=04af60ad0cd937639cf5e1a0a8d023d9c1eea152;hp=f38ba2f3d8830b8447a3ecbf5b9bfe8802f9446e;hpb=920f11ddfeb2175e4e1556886773dcd044c6085b;p=alttp.git diff --git a/resources/js/components/users/Profile.js b/resources/js/components/users/Profile.js index f38ba2f..b4c4060 100644 --- a/resources/js/components/users/Profile.js +++ b/resources/js/components/users/Profile.js @@ -1,21 +1,35 @@ 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')}

- +

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

{user.stream_link ? @@ -35,12 +49,44 @@ const Profile = ({ user }) =>

+ +

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

+ + + +

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

+ + + +

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

+ +
; 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, stream_link: PropTypes.string, + tournament_first_count: PropTypes.number, + tournament_second_count: PropTypes.number, + tournament_third_count: PropTypes.number, username: PropTypes.string, }), };