After clicking a button, the page opens lower in the mobile version causing users to scroll up each time. This issue does not occur in the desktop version.
As someone new to React and UI development, I was advised to try using tabindex=-1 in the link tag, but unfortunately, that did not solve the problem.
<div className="Header__logo--mobile hidden-on-desktop">
<Link to="/">
<img src={HomeLogoImage} ref={div => (this.imageMobile = div)} />
<img
className="Header__logo--glitch"
src={HomeLogoImageGlitch}
ref={div => (this.imageGlitchMobile = div)}
/>
</Link>
</div>
The desired outcome is for the page not to scroll down upon opening. How can I achieve this?