Skip to content

Commit

Permalink
[Release] Stage to Main (#2197)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruchika4 authored Apr 24, 2024
2 parents b764ada + 55ad0f1 commit 5291cb1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions libs/blocks/mobile-app-banner/mobile-app-banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async function getKey(product) {
}

/* eslint-disable */
function branchInit(header, key) {
function branchInit(key) {
let initValue = false;
function initBranch() {
if (initValue) {
Expand Down Expand Up @@ -49,8 +49,6 @@ function branchInit(header, key) {
);
const privacyConsent = window.adobePrivacy?.hasUserProvidedConsent();
branch.init(key, { tracking_disabled: !privacyConsent });
branch.addListener('didShowJourney', () => header.style.position = 'relative');
branch.addListener('didCloseJourney', () => header.style.position = 'sticky');
}
['adobePrivacy:PrivacyConsent', 'adobePrivacy:PrivacyReject', 'adobePrivacy:PrivacyCustom']
.forEach((event) => {
Expand All @@ -65,5 +63,5 @@ export default async function init(el) {
const classListArray = Array.from(el.classList);
const product = classListArray.find((token) => token.startsWith('product-')).split('-')[1];
const key = await getKey(product);
if (key) branchInit(header, key);
if (key) branchInit(key);
}

0 comments on commit 5291cb1

Please sign in to comment.