Skip to content

Commit

Permalink
song card hover fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TidbitsJS committed Sep 14, 2022
1 parent bfc794d commit ce8d76d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/SongCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const SongCard = ({ song, isPlaying, activeSong, data, i }) => {

return (
<div className="flex flex-col w-[270px] p-4 bg-white/5 bg-opacity-80 backdrop-blur-sm animate-slideup rounded-lg cursor-pointer">
<div className="relative w-full h-60">
<div className={`absolute inset-0 justify-center items-center ${activeSong.title === song.title ? 'flex bg-black bg-opacity-70' : 'hidden'}`}>
<div className="relative w-full h-60 group">
<div className={`absolute inset-0 justify-center items-center bg-black bg-opacity-50 group-hover:flex ${activeSong.title === song.title ? 'flex bg-black bg-opacity-70' : 'hidden'}`}>
{isPlaying && activeSong.title === song.title ? (
<FaPauseCircle size={35} onClick={() => dispatch(playPause(false))} />
) : (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const Home = () => {
const songs = location.pathname.startsWith('/search') ? data.map((song) => song.track) : data;

return (
<div className="flex flex-wrap gap-6">
<div className="flex flex-wrap gap-8">
{songs?.map((song, i) => (
<SongCard
key={song.key}
Expand Down

0 comments on commit ce8d76d

Please sign in to comment.