]> git.localhorst.tv Git - alttp.git/blob - resources/js/components/episodes/Player.js
svg dungeon tracker
[alttp.git] / resources / js / components / episodes / Player.js
1 import PropTypes from 'prop-types';
2 import React from 'react';
3 import { Button } from 'react-bootstrap';
4
5 import { getName, getStreamLink } from '../../helpers/Crew';
6 import { getAvatarUrl } from '../../helpers/User';
7
8 const Player = ({ player }) => {
9         return <div className="episode-player my-3">
10                 <Button
11                         className="player-link"
12                         href={getStreamLink(player)}
13                         rel="noreferrer"
14                         target="_blank"
15                         variant="outline-twitch"
16                 >
17                         <img alt="" src={getAvatarUrl(player.user)} />
18                         <span className="text-light fs-5 fs-md-4">{getName(player)}</span>
19                 </Button>
20         </div>;
21 };
22
23 Player.propTypes = {
24         player: PropTypes.shape({
25                 id: PropTypes.number,
26                 name_override: PropTypes.string,
27                 stream_override: PropTypes.string,
28                 user: PropTypes.shape({
29                 }),
30         }),
31 };
32
33 export default Player;