Skip to content

Commit

Permalink
feat: disabled select on like count
Browse files Browse the repository at this point in the history
  • Loading branch information
warmachine028 committed Dec 10, 2024
1 parent ae8fed2 commit 91ff665
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/src/components/LikeButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ const LikeButton = ({ commentId }) => {
onMouseEnter={handleMouseEnter}
sx={{
cursor: 'pointer',
'&:hover': { textDecoration: 'underline' }
'&:hover': { textDecoration: 'underline' },
userSelect: 'none', // This prevents text selection
WebkitUserSelect: 'none', // For webkit browsers like Chrome and Safari
MozUserSelect: 'none', // For Firefox
msUserSelect: 'none' // For Internet Explorer/Edge
}}
>
{data.likeCount} {data.likeCount === 1 ? 'like' : 'likes'}
Expand Down

0 comments on commit 91ff665

Please sign in to comment.