A decentralized music tracking and discovery platform built on AT Protocol 馃幍
at feat/discord-webhook 33 lines 848 B view raw
1import { 2 useNowPlayingContext, 3 useProgressContext, 4} from "@/src/providers/NowPlayingProvider"; 5import StickyPlayer from "./StickyPlayer"; 6 7const StickyPlayerWithData = () => { 8 const progress = useProgressContext(); 9 const nowPlaying = useNowPlayingContext(); 10 return ( 11 <> 12 {nowPlaying && ( 13 <StickyPlayer 14 isPlaying={nowPlaying.isPlaying} 15 liked={nowPlaying.liked} 16 onPlay={() => {}} 17 onPause={() => {}} 18 progress={Math.floor((progress / nowPlaying.duration) * 100)} 19 song={{ 20 title: nowPlaying.title, 21 artist: nowPlaying.artist, 22 cover: nowPlaying?.cover, 23 uri: nowPlaying.uri, 24 }} 25 onLike={() => {}} 26 onDislike={() => {}} 27 /> 28 )} 29 </> 30 ); 31}; 32 33export default StickyPlayerWithData;