minha aplicação nao esta funcionando o onClick no favoritos.
import styles from './Card.module.css'
import favoriteIcon from './favorite.png'
import { useFavoriteContext } from '../../contexts/Favorites'
import unFavoriteIcon from './unfavorite.png'
function Card({id, title, cover}){
const {favorite, addFavorite} = useFavoriteContext();
const isFavorite = favorite.filter((fav)=> fav.id === id);
const icon = isFavorite ? favoriteIcon : unFavoriteIcon;
return(
<div className={styles.container}>
<img src={cover} alt={title} className={styles.cover} />
<h2>{title}</h2>
<img src={icon} alt='Favorite film' className={styles.favorite}
onClick={()=>{addFavorite(id, title, cover)}}/>
</div>
)
}
export default Card