react-cookie-consent icon indicating copy to clipboard operation
react-cookie-consent copied to clipboard

Accept cookies method to available across the app

Open matchmakers69 opened this issue 3 years ago • 2 comments

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"));```
 

matchmakers69 avatar Aug 16 '22 14:08 matchmakers69

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!

Mastermindzh avatar Aug 17 '22 07:08 Mastermindzh

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.

stale[bot] avatar Sep 24 '22 07:09 stale[bot]