]> git.localhorst.tv Git - alttp.git/blob - resources/js/components/rounds/SeedRolledBy.js
tracker medallion controler
[alttp.git] / resources / js / components / rounds / SeedRolledBy.js
1 import PropTypes from 'prop-types';
2 import React from 'react';
3
4 import { getAvatarUrl, getUserName } from '../../helpers/User';
5 import i18n from '../../i18n';
6
7 const SeedRolledBy = ({ round }) => round.rolled_by_user ?
8         <span
9                 className="rolled-by"
10                 title={i18n.t('rounds.rolledBy', { name: getUserName(round.rolled_by_user) })}
11         >
12                 <img alt={getUserName(round.rolled_by_user)} src={getAvatarUrl(round.rolled_by_user)} />
13         </span>
14 : null;
15
16 SeedRolledBy.propTypes = {
17         round: PropTypes.shape({
18                 rolled_by_user: PropTypes.shape({
19                 }),
20         }),
21 };
22
23 export default SeedRolledBy;