Skip to content

Commit

Permalink
fix: fixed merge conflict with testbed.js from no global hooks brnach
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanneff committed Nov 16, 2016
1 parent 3143dbf commit 89252d4
Showing 1 changed file with 23 additions and 17 deletions.
40 changes: 23 additions & 17 deletions testbed/www/js.es6/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,31 @@ var app = {
};
app.initialize();



// branch
function DeepLinkHandler(data) {
console.log('Trigger DeepLinkHandler()');

if (data) {
console.log(data);
alert('Data Link handler response: ' + JSON.stringify(data));
}
function onBranchLinkHook(data) {
if (data) {
alert('Initialize: ' + JSON.stringify(data));
}
else {
alert('No data found');
}
}

function NonBranchLinkHandler(data) {
console.log('Trigger NonBranchLinkHandler()');

if (data) {
console.log(data);
alert('Non-branch link found: ' + JSON.stringify(data));
}
function InitSession() {
console.log('Trigger InitSession()');

Branch.setMixpanelToken('<your-mixpanel-token-here>');
Branch.initSession(onBranchLinkHook).then(function(res) {
console.log(res);
alert('Response: ' + JSON.stringify(res));
}).catch(function(err) {
console.error(err);
alert('Error: ' + JSON.stringify(err));
});
Branch.onNonBranchLink(function NonBranchLinkHandler(data) {
if (data) {
alert('Non-branch link found: ' + JSON.stringify(data));
}
});
}

function BranchInit(isDebug) {
Expand Down

0 comments on commit 89252d4

Please sign in to comment.