Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cobrowse-sdk-react-native

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cobrowse-sdk-react-native - npm Package Compare versions

Comparing version 2.2.2 to 2.3.0

.DS_Store

20

js/CobrowseIO.js
'use strict';
import { Alert } from 'react-native';
const CobrowseIONative = require('react-native').NativeModules.CobrowseIO;
const NativeEventEmitter = require('react-native').NativeEventEmitter;
const NativeEventEmitter = require('react-native').NativeEventEmitter;
const emitter = new NativeEventEmitter(CobrowseIONative);

@@ -23,3 +24,18 @@

static handleSessionRequest(session) {
this.activateSession();
Alert.alert(
'Support Request',
'A support agent would like to use this app with you. Do you accept?',
[
{
text: 'Reject',
onPress: () => this.endSession(),
style: 'cancel',
},
{
text: 'Accept',
onPress: () => this.activateSession()
},
],
{cancelable: true},
);
}

@@ -26,0 +42,0 @@

36

js/CobrowseView.js

@@ -29,7 +29,2 @@ import React, { Component } from 'react';

},
poweredby: {
color: '#444',
marginTop: 40,
marginBottom: 25
},
button: {

@@ -79,11 +74,2 @@ color: 'rgb(0, 122, 255)',

async approveSession() {
try {
const session = await CobrowseIO.activateSession();
this.setState({session});
} catch(error) {
this.setState({error});
}
}
async endSession() {

@@ -116,16 +102,2 @@ try {

renderApproval() {
return (
<View>
<Text style={[styles.text]}>A support agent would like to use this app with you. If you accept, they will only be able to see screens from this app.</Text>
<TouchableOpacity onPress={()=>this.approveSession()}>
<Text style={[styles.text, styles.button]}>Approve</Text>
</TouchableOpacity>
<TouchableOpacity onPress={()=>this.endSession()}>
<Text style={[styles.text, styles.button]}>Decline</Text>
</TouchableOpacity>
</View>
)
}
renderManageSession() {

@@ -146,6 +118,4 @@ return (

return this.renderError();
} else if ((!session) || ((session.state === 'pending') && !session.agent)) {
} else if ((!session) || ((session.state === 'pending' || session.state === 'authorizing')) {
return this.renderCode();
} else if ((session.state === 'pending') && this.state.session.agent) {
return this.renderApproval();
} else {

@@ -160,6 +130,2 @@ return this.renderManageSession();

{this.renderContent()}
<TouchableOpacity
onPress={()=>Linking.openURL('https://cobrowse.io/sdk-powered-by')} >
<Text style={[styles.text, styles.poweredby]}>Powered by Cobrowse.io</Text>
</TouchableOpacity>
</View>

@@ -166,0 +132,0 @@ );

{
"name": "cobrowse-sdk-react-native",
"version": "2.2.2",
"version": "2.3.0",
"description": "Cobrowse SDK for React Native",

@@ -5,0 +5,0 @@ "main": "./js/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc