X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Fepisodes%2FPlayer.js;h=3fc285fe422e2f4decd48d17cbfb3eebb3e1f15c;hb=1557083acedbffeae2cec7deaa485fd8dcdbaa49;hp=27f5dd4e181e35625adda5ced29cc44f64015b0c;hpb=847969157063510460a48eba4bedfcce1caa7902;p=alttp.git diff --git a/resources/js/components/episodes/Player.js b/resources/js/components/episodes/Player.js index 27f5dd4..3fc285f 100644 --- a/resources/js/components/episodes/Player.js +++ b/resources/js/components/episodes/Player.js @@ -2,28 +2,9 @@ import PropTypes from 'prop-types'; import React from 'react'; import { Button } from 'react-bootstrap'; +import { getName, getStreamLink } from '../../helpers/Crew'; import { getAvatarUrl } from '../../helpers/User'; -const getName = player => { - if (player.name_override) { - return player.name_override; - } - if (player.user) { - return player.user.nickname || player.user.username; - } - return ''; -}; - -const getStreamLink = player => { - if (player.stream_override) { - return `https://twitch.tv/${player.stream_override}`; - } - if (player.user && player.user.stream_link) { - return player.user.stream_link; - } - return ''; -}; - const Player = ({ player }) => { return