1 import PropTypes from 'prop-types';
2 import React from 'react';
3 import { Button, Col, Container, Row } from 'react-bootstrap';
4 import { withTranslation } from 'react-i18next';
6 import Box from './Box';
7 import Records from './Records';
8 import EditStreamLinkButton from './EditStreamLinkButton';
9 import Participation from './Participation';
10 import Icon from '../common/Icon';
11 import i18n from '../../i18n';
13 const Profile = ({ user }) => <Container>
14 <h1>{user.username}</h1>
16 <Col md={6} className="mb-5">
17 <h2>{i18n.t('users.discordTag')}</h2>
18 <Box discriminator user={user} />
20 <Col md={6} className="mb-5">
21 <h2>{i18n.t('users.streamLink')}</h2>
25 href={user.stream_link}
27 variant="outline-twitch"
34 i18n.t('users.noStream')
37 <EditStreamLinkButton user={user} />
40 <Col md={6} className="mb-5">
41 <h2>{i18n.t('users.tournamentRecords')}</h2>
43 first={user.tournament_first_count}
44 second={user.tournament_second_count}
45 third={user.tournament_third_count}
48 <Col md={6} className="mb-5">
49 <h2>{i18n.t('users.roundRecords')}</h2>
51 first={user.round_first_count}
52 second={user.round_second_count}
53 third={user.round_third_count}
56 <Col md={12} className="mb-5">
57 <h2>{i18n.t('users.tournaments')}</h2>
58 <Participation user={user} />
64 user: PropTypes.shape({
65 participation: PropTypes.arrayOf(PropTypes.shape({
67 round_first_count: PropTypes.number,
68 round_second_count: PropTypes.number,
69 round_third_count: PropTypes.number,
70 stream_link: PropTypes.string,
71 tournament_first_count: PropTypes.number,
72 tournament_second_count: PropTypes.number,
73 tournament_third_count: PropTypes.number,
74 username: PropTypes.string,
78 export default withTranslation()(Profile);