RegistrationResult.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import React from 'react';
  2. import { ImageBackground, StyleSheet, View, Dimensions, TouchableOpacity, Image, Alert } from 'react-native';
  3. import { Text, } from 'react-native-paper'
  4. import 'react-native-get-random-values';
  5. import { useRegistrationFormState } from '../contexts/RegisterContext';
  6. const RegisterResult = ({navigation, route}) => {
  7. const back = () => {
  8. navigation.reset({
  9. index: 0,
  10. routes: [{name: "Intro"}]
  11. });
  12. }
  13. return (
  14. <ImageBackground style={styles.container} source={require('../assets/cover-dark.png')}>
  15. <View style={styles.brandContainer}>
  16. <Text style={styles.title} >{route.params.result}</Text>
  17. </View>
  18. <TouchableOpacity onPress={back} style={styles.nextBtn} >
  19. <Text style={{ color: 'white', fontSize: 20 }}>Okay</Text>
  20. </TouchableOpacity>
  21. </ImageBackground>
  22. )
  23. }
  24. const styles = StyleSheet.create({
  25. container: {
  26. position: 'absolute',
  27. width: Dimensions.get('window').width,
  28. height: Dimensions.get('window').height,
  29. flex: 1,
  30. flexDirection: 'column',
  31. resizeMode: 'cover',
  32. },
  33. brandContainer: {
  34. marginTop: 70,
  35. height: 50,
  36. marginBottom: 70,
  37. marginLeft: 25,
  38. flexDirection: 'column',
  39. justifyContent: 'space-evenly'
  40. },
  41. title: {
  42. fontFamily: 'RacingSansOne-Regular',
  43. color: 'white',
  44. fontSize: 20,
  45. },
  46. nextBtn: {
  47. marginHorizontal: 20,
  48. borderRadius: 50,
  49. justifyContent: 'center',
  50. backgroundColor: '#df3f3f',
  51. margin: 5,
  52. height: 50,
  53. alignItems: 'center'
  54. },
  55. })
  56. export default RegisterResult;