diff --git a/src/rn/src/Screens/Success.jsx b/src/rn/src/Screens/Success.jsx index 17ef685..5e4a18c 100644 --- a/src/rn/src/Screens/Success.jsx +++ b/src/rn/src/Screens/Success.jsx @@ -1,8 +1,8 @@ -import React, {Component} from 'react' -import {StyleSheet, Text, View} from 'react-native' +import React, { Component } from 'react' +import { StyleSheet, Text, View, Image } from 'react-native' import * as PushNotification from 'react-native-push-notification' -import {Styles} from '../Helper' +import { Styles } from '../Helper' import BG from '../BG' import QRButton from '../Components/Button' @@ -14,29 +14,49 @@ export default class extends Component { constructor(props) { super(props) - const {navigation} = props + const { navigation } = props const code = navigation.getParam('code', undefined) - this.state = {code} + this.state = { code } if (code === undefined) navigation.navigate('scan') - else PushNotification.localNotification({ + else PushNotification.localNotificationSchedule({ + id: 0, title: '🚀 Scan succeded!', message: `Your super sercret code is: ${code}`, + date: new Date(Date.now() + (5 * 1000)) }) } render() { - const {navigate} = this.props.navigation + const { navigate } = this.props.navigation return - - navigate('Home')}/> - {this.state.code} - + navigate('Home')} /> + Success + + } -} \ No newline at end of file +} + +const styles = StyleSheet.create({ + space: { + paddingTop: 100, + }, + bold: { + fontWeight: 'bold', + }, + image: { + width: 32, + height: 32, + margin: 16, + }, +}) \ No newline at end of file