Closed oskarrough closed 2 years ago
This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://vercel.com/internet4000/cms/Gfxt7jhXuLjcvg79agbNWxGu6tu7
✅ Preview: https://cms-git-feat-player-internet40001.vercel.app
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
cms | ✅ Ready (Inspect) | Visit Preview | Aug 11, 2022 at 8:42PM (UTC) |
Adds a new
usePlayer()
hook that can be used anywhere. Currently it can hold and set achannel
and atrack
but that's mostly for testing. The hook uses context behind the scenes ala https://kentcdodds.com/blog/how-to-use-react-context-effectively. Like this:https://github.com/radio4000/cms/blob/aa1396564888dc416ae47f7e4f876c6a6d56504a/src/components/player.js#L21-L28
Also adds the
<radio4000-player>
and renders it into the layout footer for now. Made it sticky as well. Since the player loads data from Firebase we need to consider what to do when data doesn't come from firebase. ThesetPlaylist
method? But couldn't make it work yet..<radio4000-player>.setPlaylist()
work see https://github.com/radio4000/cms/blob/feat/player/src/components/player.js#L30Closes #21