Skip to content

Commit

Permalink
feat: add preventDefault and stopPropagation when user click icon
Browse files Browse the repository at this point in the history
  • Loading branch information
aboutmydreams committed Feb 20, 2024
1 parent 2155c15 commit 2b9294b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Binary file removed dist.zip
Binary file not shown.
8 changes: 7 additions & 1 deletion src/components/twitterAdded/feedsPage/ethIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ interface FriendPriceProps {

export const FriendPrice: FC<FriendPriceProps> = ({ price }) => {
return (
<div className="justify-center items-center text-center w-auto">
<div
className="justify-center items-center text-center w-auto"
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
}}
>
<svg
className="mx-auto mt-[10px] mb-[4px]"
width="12"
Expand Down
6 changes: 5 additions & 1 deletion src/components/twitterAdded/feedsPage/voteIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ export const VoteTwitter: FC<VoteTwitterProps> = ({ twitterId, userName }) => {
return (
<div
className="justify-center items-center text-center w-auto ml-[55px] !cursor-pointer !z-[999]"
onClick={() => setVoted(!voted)}
onClick={(e) => {
setVoted(!voted);
e.preventDefault();
e.stopPropagation();
}}
>
{!voted ? (
<svg
Expand Down

0 comments on commit 2b9294b

Please sign in to comment.