mirror of
https://github.com/r-freeman/portfolio.git
synced 2024-11-26 04:45:42 +00:00
Removed redundant code from SpotifyPlayer
This commit is contained in:
parent
2e0364444b
commit
8edf916fba
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user