This is my code and its parent component includes scroll eventlistener
<CookieConsent
buttonText="Allow Cookies"
cookieName="allow-cookies"
style={{ background: '#2B373B' }}
buttonStyle={{
background: 'rgba(76, 183, 129, 0.95)',
color: '#fff',
fontSize: '13px'
}}
expires={150}
>
<div className="mb-3">
<b>Cookie Consent</b>
</div>
We use necessary cookies to make our site work. We'd like
to set additional cookies to understand site usage, make site
improvements and to remember your settings. We also use cookies
set by other sites to help deliver content from their services.
View our Cookie Notice
<div className="mt-3">
<Button onClick={onHide} className="start-btn mb-3">
Manage My Choices
</Button>
<Button onClick={onHide} className="start-btn mb-3">
Reject Additional Cookies
</Button>
<Button onClick={onHide} className="start-btn mb-3">
Accept Additional Cookies
</Button>
</div>
</CookieConsent>
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is my code and its parent component includes scroll eventlistener
parent component
If I remove this part, then it works well but if it exists, then it disappears when I scroll down