Skip to content

Commit

Permalink
style: change image only when image link is hovered
Browse files Browse the repository at this point in the history
  • Loading branch information
satnaing committed Feb 28, 2022
1 parent 97df958 commit dadc631
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions components/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ const Card: FC<Props> = ({ item }) => {
};

return (
<div
className={styles.card}
onMouseOver={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
>
<div className={styles.card}>
<div className={styles.imageContainer}>
<Link href={itemLink}>
<a tabIndex={-1}>
<a
tabIndex={-1}
onMouseOver={() => setIsHovered(true)}
onMouseLeave={() => setIsHovered(false)}
>
{!isHovered && (
<Image
src={img1 as string}
Expand Down

0 comments on commit dadc631

Please sign in to comment.