X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Fepisodes%2FChannel.js;h=e2d25d72bf209e59a69fc3d1ca36c79618a3f8cd;hb=4c5a82cb876e96c72c50e8bc12bd8a43a9afe847;hp=d0360bd58dc4648fb83521a30940650ac9a915e6;hpb=a5d038197b7a31c2d354fed242985cb604c4f8a8;p=alttp.git diff --git a/resources/js/components/episodes/Channel.js b/resources/js/components/episodes/Channel.js index d0360bd..e2d25d7 100644 --- a/resources/js/components/episodes/Channel.js +++ b/resources/js/components/episodes/Channel.js @@ -4,10 +4,12 @@ import { Button } from 'react-bootstrap'; import Icon from '../common/Icon'; import { mayEditRestream } from '../../helpers/permissions'; -import { withUser } from '../../helpers/UserContext'; +import { useUser } from '../../hooks/user'; -const Channel = ({ channel, episode, onEditRestream, user }) => -
+const Channel = ({ channel, episode, onEditRestream }) => { + const { user } = useUser(); + + return
: null}
; +}; Channel.propTypes = { channel: PropTypes.shape({ @@ -39,8 +42,6 @@ Channel.propTypes = { episode: PropTypes.shape({ }), onEditRestream: PropTypes.func, - user: PropTypes.shape({ - }), }; -export default withUser(Channel); +export default Channel;