Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
pass props to like button
Browse files Browse the repository at this point in the history
  • Loading branch information
eoss-sh committed Jul 2, 2023
1 parent 1d8201e commit cb199fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/InteractionButtons/interactionButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ const classes = {
const LikeContent: FC<ContentProps> = ({
count,
onClick,
hasLiked = false
hasLiked = false,
...props
}) => {
const [liked, setLiked] = useState(hasLiked)
const [localCount, setLocalCount] = useState(count)
Expand Down Expand Up @@ -59,6 +60,7 @@ const LikeContent: FC<ContentProps> = ({
: 'text-slate-600 hover:text-pink-600'
}`}
onClick={() => handleLike()}
{...props}
>
<Icon type={!liked ? IconType.like : IconType.like_dark} />
<p>
Expand Down

0 comments on commit cb199fb

Please sign in to comment.