Removed redundant code from SpotifyPlayer

This commit is contained in:
r-freeman 2023-01-06 23:24:10 +00:00
parent 2e0364444b
commit 8edf916fba

View File

@ -154,12 +154,6 @@ Song.Skeleton = function SongSkeleton({as: Component = 'div'}) {
)
}
function CurrentlyPlaying(props) {
return (
<Song {...props}/>
)
}
function LastPlayed() {
const {song, isLoading, isError} = usePlayerState('last-played')
@ -186,7 +180,7 @@ export function SpotifyPlayer() {
{isLoading
? <Song.Skeleton/>
: song?.isPlaying
? <CurrentlyPlaying {...song}/>
? <Song {...song}/>
: <LastPlayed/>
}
</div>