remove: remove onClick props and handleClick func

This commit is contained in:
unknown 2021-08-25 11:40:17 +07:00
parent 9ed49d6ae7
commit b69f58b147

View File

@ -5,20 +5,17 @@ import s from './ItemWishList.module.scss'
interface Props { interface Props {
isActive?: boolean, isActive?: boolean,
onClick?: () => void
onChange?: () => void onChange?: () => void
} }
const ItemWishList = memo(({isActive, onClick, onChange}:Props) => { const ItemWishList = memo(({isActive, onChange}:Props) => {
const handleClick = () => {
isActive = !isActive
}
return( return(
<div className={classNames({ <div className={classNames({
[s.heartToggle]:true, [s.heartToggle]:true,
[s.isToggleOn]:isActive [s.isToggleOn]:isActive
})} })}
onClick={handleClick}> onChange={onChange}
>
<IconHeart /> <IconHeart />
</div> </div>
) )