mirror of
https://github.com/cupcakearmy/fight-of-the-mobiles.git
synced 2024-11-05 06:54:24 +01:00
Added missing succes message and image
This commit is contained in:
parent
38f51dc02c
commit
a25e8c90c5
@ -1,8 +1,8 @@
|
|||||||
import React, {Component} from 'react'
|
import React, { Component } from 'react'
|
||||||
import {Animated, StyleSheet, Text, View, Easing} from 'react-native'
|
import { Animated, StyleSheet, Text, View, Easing } from 'react-native'
|
||||||
import QRCodeScanner from 'react-native-qrcode-scanner'
|
import QRCodeScanner from 'react-native-qrcode-scanner'
|
||||||
|
|
||||||
import {Styles} from '../Helper'
|
import { Styles } from '../Helper'
|
||||||
import BG from '../BG'
|
import BG from '../BG'
|
||||||
|
|
||||||
export default class extends Component {
|
export default class extends Component {
|
||||||
@ -14,7 +14,7 @@ export default class extends Component {
|
|||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props)
|
super(props)
|
||||||
|
|
||||||
this.state = {rotation: new Animated.Value(0)}
|
this.state = { rotation: new Animated.Value(0) }
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
@ -32,7 +32,7 @@ export default class extends Component {
|
|||||||
|
|
||||||
gotCode(e) {
|
gotCode(e) {
|
||||||
const code = e.data
|
const code = e.data
|
||||||
this.props.navigation.navigate('Success', {code})
|
this.props.navigation.navigate('Success', { code })
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
@ -45,12 +45,12 @@ export default class extends Component {
|
|||||||
|
|
||||||
return <BG>
|
return <BG>
|
||||||
<View style={Styles.center}>
|
<View style={Styles.center}>
|
||||||
<QRCodeScanner containerStyle={styles.scanner} onRead={(e) => this.gotCode(e)}/>
|
<QRCodeScanner containerStyle={styles.scanner} onRead={(e) => this.gotCode(e)} />
|
||||||
<View style={{...styles.space, ...Styles.center}}>
|
<View style={{ ...styles.space, ...Styles.center }}>
|
||||||
<Text style={styles.bold}>Scanning...</Text>
|
<Text style={styles.bold}>Scanning...</Text>
|
||||||
<Animated.Image
|
<Animated.Image
|
||||||
resizeMode="contain"
|
resizeMode="contain"
|
||||||
style={{...styles.image, transform: [{rotate: spin}]}}
|
style={{ ...styles.image, transform: [{ rotate: spin }] }}
|
||||||
source={require('../../assets/images/sync.png')}
|
source={require('../../assets/images/sync.png')}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
@ -65,8 +65,6 @@ const styles = StyleSheet.create({
|
|||||||
padding: 20,
|
padding: 20,
|
||||||
borderColor: '#0ff',
|
borderColor: '#0ff',
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
// width: 100,
|
|
||||||
// height: 100
|
|
||||||
},
|
},
|
||||||
space: {
|
space: {
|
||||||
marginTop: 100,
|
marginTop: 100,
|
||||||
|
Loading…
Reference in New Issue
Block a user