From 7c6ed9443d3f2a2565688e95bd3ee81eed6aca6c Mon Sep 17 00:00:00 2001 From: Jimmy Dee Date: Mon, 2 Oct 2017 11:13:43 -0700 Subject: [PATCH] Remove share button from browser_example --- examples/browser_example/src/App.js | 38 +---------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/examples/browser_example/src/App.js b/examples/browser_example/src/App.js index fb9216139..9c5e5b9e4 100644 --- a/examples/browser_example/src/App.js +++ b/examples/browser_example/src/App.js @@ -1,5 +1,5 @@ import React, { Component } from 'react' -import { StyleSheet, Text, TextInput, TouchableHighlight, View, WebView } from 'react-native' +import { StyleSheet, Text, TextInput, View, WebView } from 'react-native' import branch, { RegisterViewEvent } from 'react-native-branch' @@ -15,13 +15,6 @@ const styles = StyleSheet.create({ webView: { flex: 0.77 }, - button: { - backgroundColor: '#cceeee', - borderColor: '#2266aa', - borderTopWidth: 1, - flex: 0.15, - justifyContent: 'center' - }, buttonText: { color: '#2266aa', fontSize: 23, @@ -85,14 +78,6 @@ export default class App extends Component { style={styles.webView} source={{uri: this.state.url}} onLoad={this.registerView.bind(this)} /> - this.onShare()} - style={styles.button} > - - Share - - ) } @@ -114,25 +99,4 @@ export default class App extends Component { this.buo.userCompletedAction(RegisterViewEvent) console.log("Created Branch Universal Object and logged RegisterViewEvent.") } - - async onShare() { - let { channel, completed, error } = await this.buo.showShareSheet({ - emailSubject: "The Planet " + this.props.route.title, - messageBody: "Read about the planet " + this.props.route.title + ".", - messageHeader: "The Planet " + this.props.route.title - }, { - feature: "share", - channel: "RNApp" - }, { - $desktop_url: this.props.route.url, - $ios_deepview: "branch_default" - }) - - if (error) { - console.error("Error sharing via Branch: " + error) - return - } - - console.log("Share to " + channel + " completed: " + completed) - } }