diff --git a/package.json b/package.json index f9ec70f..950ae58 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aesirx-analytics", - "version": "2.3.2", + "version": "2.3.3", "license": "GPL-3.0-only", "author": "AesirX", "repository": "https://gitlab.redweb.dk/aesirx/analytics", @@ -99,6 +99,7 @@ "@walletconnect/core": "2.9.1", "@walletconnect/types": "2.9.1", "@walletconnect/sign-client": "2.9.1", + "cookie": "^0.7.0", "rollup": "3.29.5" } } diff --git a/src/Components/ConsentCustom.tsx b/src/Components/ConsentCustom.tsx index bf1eec7..39e3d1b 100644 --- a/src/Components/ConsentCustom.tsx +++ b/src/Components/ConsentCustom.tsx @@ -933,7 +933,10 @@ const ConsentComponentCustomApp = (props: any) => { onClick={async () => { if (revokeConsentOption === 'consent') { await handleRevokeBtn(); - if (level > 1 || window['aesirx1stparty']) { + const levelRevoke = + sessionStorage.getItem('aesirx-analytics-revoke') && + parseInt(sessionStorage.getItem('aesirx-analytics-revoke')); + if (levelRevoke > 1 || window['aesirx1stparty']) { setTimeout(() => { window.location.reload(); }, 1000); diff --git a/src/Hooks/useConsentStatus.ts b/src/Hooks/useConsentStatus.ts index 2e909fc..7c97e15 100644 --- a/src/Hooks/useConsentStatus.ts +++ b/src/Hooks/useConsentStatus.ts @@ -75,6 +75,7 @@ const useConsentStatus = (endpoint?: string, layout?: string, props?: WalletConn sessionStorage.removeItem('aesirx-analytics-allow'); return; } else { + setShow(false); sessionStorage.setItem('aesirx-analytics-uuid', analyticsContext.visitor_uuid); sessionStorage.setItem('aesirx-analytics-allow', '1'); if (consent) { diff --git a/yarn.lock b/yarn.lock index 661d304..e0500e4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4143,10 +4143,10 @@ cookie-es@^1.1.0: resolved "https://registry.yarnpkg.com/cookie-es/-/cookie-es-1.2.2.tgz#18ceef9eb513cac1cb6c14bcbf8bdb2679b34821" integrity sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg== -cookie@~0.4.1: - version "0.4.2" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.2.tgz#0e41f24de5ecf317947c82fc789e06a884824432" - integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== +cookie@^0.7.0, cookie@~0.4.1: + version "0.7.2" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.7.2.tgz#556369c472a2ba910f2979891b526b3436237ed7" + integrity sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w== copy-to-clipboard@^3.3.1, copy-to-clipboard@^3.3.3: version "3.3.3"