Skip to content

Commit

Permalink
Fixed Duplicate Scroll Button Issue in Safari Browser
Browse files Browse the repository at this point in the history
  • Loading branch information
Prathamesh-V-Kirad committed Nov 13, 2024
1 parent 6f15381 commit 81acc9f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions components/buttons/ScrollButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@ function ScrollButton() {

return (
<div className='fixed bottom-14 right-4 z-40 h-16 w-12'>
{backToTopButton && (
<button className='rounded-full bg-white shadow-md ' onClick={scrollUp}>
<img src={scrollImage} alt='scroll to top' />
</button>
)}
<button
className={`rounded-full bg-white shadow-md ${backToTopButton ? 'visible' : 'pointer-events-none invisible'}`}
onClick={scrollUp}
>
<img src={scrollImage} alt='scroll to top' />
</button>
</div>
);
}
Expand Down

0 comments on commit 81acc9f

Please sign in to comment.