Skip to content

Commit

Permalink
fix: make whole cover image clickable for toggling play/pause
Browse files Browse the repository at this point in the history
  • Loading branch information
SevenOutman committed Jul 27, 2023
1 parent 0ffa21f commit 524513a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ export function APlayer({
<div className="aplayer-body">
<div
className="aplayer-pic"
onClick={handlePlayButtonClick}
style={{
backgroundImage: `url("${playlist.currentSong?.cover}")`,
}}
Expand All @@ -180,7 +181,6 @@ export function APlayer({
"aplayer-button",
audioControl.isPlaying ? "aplayer-pause" : "aplayer-play"
)}
onClick={handlePlayButtonClick}
>
{audioControl.isPlaying ? <IconPause /> : <IconPlay />}
</div>
Expand Down

0 comments on commit 524513a

Please # to comment.