react-cookie-consent
react-cookie-consent copied to clipboard
Accept cookies method to available across the app
Would be possible to use acceptCookies function in different parts of the app? Basically what I need is to accept cookies on cookies page without using:
const handleAcceptRejectCookies = () => {
if (isCookieAccepted) {
document.cookie = "CookieConsent=true";
} else {
document.cookie = "CookieConsent=false";
}
snackSuccess(t("updatedCookiesSuccess"));```
Hey @matchmakers69,
The accept functionality is not available outside of the bar. You can of course set the cookie manually but that defeats the entire purpose of the package.
Wish you the best with your app though!
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.