From 7aaa1e2cc4b595a6555e601946849cbb5f610929 Mon Sep 17 00:00:00 2001 From: umarsheikh13 Date: Thu, 9 Feb 2017 14:21:46 +0000 Subject: [PATCH 1/3] Switched around the meta names for the app IDs --- src/components/SmartBanner/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/SmartBanner/index.js b/src/components/SmartBanner/index.js index 444949c51..d01fbffb3 100644 --- a/src/components/SmartBanner/index.js +++ b/src/components/SmartBanner/index.js @@ -76,13 +76,13 @@ class SmartBanner extends Component { const mixins = { ios: { icon: 'app-banner-ios.jpg', - appMeta: 'google-play-app', + appMeta: 'apple-itunes-app', getStoreLink: () => `https://itunes.apple.com/${this.props.appStoreLanguage}/app/id`, }, android: { icon: 'app-banner-android.png', - appMeta: 'apple-itunes-app', + appMeta: 'google-play-app', getStoreLink: () => 'http://play.google.com/store/apps/details?id=', } From 316fe071fd1f654e873f74062834b916180527e4 Mon Sep 17 00:00:00 2001 From: umarsheikh13 Date: Thu, 9 Feb 2017 16:55:29 +0000 Subject: [PATCH 2/3] Close and install onclick event handlers are now working --- src/components/SmartBanner/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/SmartBanner/index.js b/src/components/SmartBanner/index.js index d01fbffb3..e510bd81f 100644 --- a/src/components/SmartBanner/index.js +++ b/src/components/SmartBanner/index.js @@ -101,11 +101,11 @@ class SmartBanner extends Component { return /app-id=([^\s,]+)/.exec(meta.getAttribute('content'))[1]; } - hide = () => { + hide() { window.document.querySelector('html').classList.remove('smartbanner-show'); } - show = () => { + show() { window.document.querySelector('html').classList.add('smartbanner-show'); } @@ -178,7 +178,7 @@ class SmartBanner extends Component { this.close()} data-metrics-event-name="SmartBanner:close" > @@ -190,7 +190,7 @@ class SmartBanner extends Component { {inStore} - + this.install()} className="smartbanner-button" data-metrics-event-name="SmartBanner:InstallAapp"> {this.props.button} From 37dc5ab4b23aa3e38d1efe7632363488b5b94a54 Mon Sep 17 00:00:00 2001 From: umarsheikh13 Date: Thu, 9 Feb 2017 17:05:40 +0000 Subject: [PATCH 3/3] Fixed issue of this being expected in hide/show methods --- src/components/SmartBanner/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/SmartBanner/index.js b/src/components/SmartBanner/index.js index e510bd81f..2d0dd362e 100644 --- a/src/components/SmartBanner/index.js +++ b/src/components/SmartBanner/index.js @@ -101,11 +101,11 @@ class SmartBanner extends Component { return /app-id=([^\s,]+)/.exec(meta.getAttribute('content'))[1]; } - hide() { + hide = () => { window.document.querySelector('html').classList.remove('smartbanner-show'); } - show() { + show = () => { window.document.querySelector('html').classList.add('smartbanner-show'); }