BranchMetrics / web-branch-deep-linking-attribution

The Branch Web SDK for deep linking and attribution. Once initialized, the Branch Web SDK allows you to create and share links with a banner (web only), over SMS, or your own methods by generating deep links. It also offers event tracking, access to referrals, and management of credits.
https://help.branch.io/developers-hub/docs/web-sdk-overview
MIT License
287 stars 101 forks source link

BUX-931 Creates common event handler to handle banner close #812

Open yli-branch opened 2 years ago

yli-branch commented 2 years ago

modalBackground and closeButton both used the same onClick handling logic. This PR consolidates that logic into one helper function. Note: the variable name closeBanner is already in scope and taken, which is why I chose handleCloseButton. Other option I considered was handleCloseButtonClick - doing so might require us to consolidate the addEventListener('click', ...) logic into this helper function as well.

yli-branch commented 1 year ago

@JagadeeshKaricherla-branch What's the npm version I should be using when running npm install? I've updated my global settings to node: 14.15.0, npm: 8.11.0, and using these versions result in a large change to package-lock.json

JagadeeshKaricherla-branch commented 1 year ago

@yli-branch : I will do the merge and release for this later as we have a revert to do for another PR before merging this to prod.