mirror of
https://github.com/vercel/commerce.git
synced 2025-07-04 04:01:21 +00:00
remove: remove onClick props and handleClick func
This commit is contained in:
parent
9ed49d6ae7
commit
b69f58b147
@ -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>
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user