Skip to content

Commit

Permalink
refactor: delete useEffect
Browse files Browse the repository at this point in the history
  • Loading branch information
seoulyego committed Oct 31, 2024
1 parent 86116f7 commit f25e527
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/components/Button/PreviewLikeButton.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState } from 'react'
import React, { useState } from 'react'
import PropTypes from 'prop-types'
import { FaHeart, FaRegHeart } from 'react-icons/fa6'
import useProductLike from '@hooks/useProductLike'
Expand Down Expand Up @@ -31,10 +31,6 @@ function PreviewLikeButton({
}
}

useEffect(() => {
setIsLiked(likeContent)
}, [likeContent])

const iconValue = {
color: isLiked ? 'red' : 'darkgray',
size: iconSize,
Expand Down

0 comments on commit f25e527

Please sign in to comment.