mirror of
https://github.com/r-freeman/portfolio.git
synced 2024-11-11 18:45:41 +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() {
|
function LastPlayed() {
|
||||||
const {song, isLoading, isError} = usePlayerState('last-played')
|
const {song, isLoading, isError} = usePlayerState('last-played')
|
||||||
|
|
||||||
@ -186,7 +180,7 @@ export function SpotifyPlayer() {
|
|||||||
{isLoading
|
{isLoading
|
||||||
? <Song.Skeleton/>
|
? <Song.Skeleton/>
|
||||||
: song?.isPlaying
|
: song?.isPlaying
|
||||||
? <CurrentlyPlaying {...song}/>
|
? <Song {...song}/>
|
||||||
: <LastPlayed/>
|
: <LastPlayed/>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user