aesirx-analytics 2.2.6 → 2.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -221,43 +221,47 @@ var useConsentStatus = (endpoint, layout, props) => {
221
221
  (async () => {
222
222
  try {
223
223
  let l = level;
224
- if (rpc) {
225
- if (l < 3) {
226
- setLevel(null);
227
- l = 3;
228
- let web3ID2 = false;
229
- if (account && sessionStorage.getItem("aesirx-analytics-consent-type") !== "metamask") {
230
- web3ID2 = await getWeb3ID(account, rpc, network?.name);
231
- if (web3ID2 === true) {
232
- l = 4;
233
- }
234
- }
235
- setWeb3ID(web3ID2);
236
- if (layout !== "simple-consent-mode" && layout !== "simple-web-2") {
237
- setLevel(l);
238
- } else {
239
- setLevel(1);
240
- }
241
- }
242
- } else if (connector) {
243
- if (layout !== "simple-consent-mode" && layout !== "simple-web-2") {
224
+ if (isDesktop) {
225
+ if (rpc) {
244
226
  if (l < 3) {
227
+ setLevel(null);
245
228
  l = 3;
246
- const web3ID2 = false;
229
+ let web3ID2 = false;
230
+ if (account && sessionStorage.getItem("aesirx-analytics-consent-type") !== "metamask") {
231
+ web3ID2 = await getWeb3ID(account, rpc, network?.name);
232
+ if (web3ID2 === true) {
233
+ l = 4;
234
+ }
235
+ }
247
236
  setWeb3ID(web3ID2);
248
- setLevel(l);
249
- } else {
250
- if (l === 4) {
251
- setLevel(4);
237
+ if (layout !== "simple-consent-mode" && layout !== "simple-web-2") {
238
+ setLevel(l);
252
239
  } else {
253
- setLevel(3);
240
+ setLevel(1);
254
241
  }
255
242
  }
243
+ } else if (connector && isDesktop) {
244
+ if (layout !== "simple-consent-mode" && layout !== "simple-web-2") {
245
+ if (l < 3) {
246
+ l = 3;
247
+ const web3ID2 = false;
248
+ setWeb3ID(web3ID2);
249
+ setLevel(l);
250
+ } else {
251
+ if (l === 4) {
252
+ setLevel(4);
253
+ } else {
254
+ setLevel(3);
255
+ }
256
+ }
257
+ } else {
258
+ setLevel(1);
259
+ }
256
260
  } else {
257
- setLevel(1);
261
+ setLevel(level ?? layout === "advance-consent-mode" ? 2 : 1);
258
262
  }
259
263
  } else {
260
- setLevel(level ?? layout === "advance-consent-mode" ? 2 : 1);
264
+ setLevel(1);
261
265
  }
262
266
  } catch (error) {
263
267
  setLevel(level ?? layout === "advance-consent-mode" ? 2 : 1);
package/dist/index.js CHANGED
@@ -523,8 +523,8 @@ var handle_default = AnalyticsHandle;
523
523
 
524
524
  // src/AnalyticsNext/index.tsx
525
525
  import dynamic from "next/dynamic";
526
- var ConsentComponent = dynamic(() => import("./Consent-U7ESRVW5.js"), { ssr: false });
527
- var ConsentComponentCustom = dynamic(() => import("./ConsentCustom-CSPWI25K.js"), { ssr: false });
526
+ var ConsentComponent = dynamic(() => import("./Consent-M45YG3LT.js"), { ssr: false });
527
+ var ConsentComponentCustom = dynamic(() => import("./ConsentCustom-IPBQSSPS.js"), { ssr: false });
528
528
  var AnalyticsNext = ({
529
529
  router,
530
530
  attributes,
@@ -612,8 +612,8 @@ var AnalyticsHandle2 = ({ location, history, children }) => {
612
612
  var handle_default2 = AnalyticsHandle2;
613
613
 
614
614
  // src/AnalyticsReact/index.tsx
615
- var ConsentComponent2 = React4.lazy(() => import("./Consent-U7ESRVW5.js"));
616
- var ConsentComponentCustom2 = React4.lazy(() => import("./ConsentCustom-CSPWI25K.js"));
615
+ var ConsentComponent2 = React4.lazy(() => import("./Consent-M45YG3LT.js"));
616
+ var ConsentComponentCustom2 = React4.lazy(() => import("./ConsentCustom-IPBQSSPS.js"));
617
617
  var AnalyticsReact = ({ location, history, oldLayout = false, children }) => {
618
618
  const [layout, setLayout] = useState3(process.env.REACT_APP_CONSENT_LAYOUT);
619
619
  const [gtagId, setGtagId] = useState3(process.env.REACT_APP_ANALYTICS_GTAG_ID);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aesirx-analytics",
3
- "version": "2.2.6",
3
+ "version": "2.2.7",
4
4
  "license": "GPL-3.0-only",
5
5
  "author": "AesirX",
6
6
  "repository": "https://gitlab.redweb.dk/aesirx/analytics",