Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React, {Component} from 'react'
import {
Platform,
View,
Text,
TouchableHighlight,
StyleSheet,
Dimensions,
Image,
TouchableOpacity
} from 'react-native'
import Icon from 'react-native-vector-icons/Ionicons'
if (Platform.OS !== 'web') {
var Camera = require('react-native-camera').default
}
import Spinner from '../components/base/Spinner'
import packageObj from '../../package.json'
const {height, width} = Dimensions.get('window')
class Login extends Component {
_onLoginPress () {
const {ui, router, actions} = this.props
if (ui.checkTokenPending) { return }
if (Platform.OS !== 'web') {
Platform.OS === 'android' ? router.toQRCode() : Camera.checkDeviceAuthorizationStatus()
.then((isAuth) => {
if (isAuth) {
router.toQRCode()
import React, {Component} from 'react'
import {StyleSheet, View, Text, Dimensions, Platform, TouchableOpacity, Vibration} from 'react-native'
if (Platform.OS !== 'web') {
var Camera = require('react-native-camera').default
var BarcodeScanner = require('react-native-barcodescanner')
}
import Icon from 'react-native-vector-icons/Ionicons'
import OverlayButton from '../components/base/OverlayButton'
const {height, width} = Dimensions.get('window')
const cameraSize = 250
const borderColor = 'rgba(255,255,255,0.6)'
const borderBoxSize = 35
class QRCode extends Component {
constructor (props) {
super(props)
this.succesed = false
}