Account.js 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. import React from 'react';
  2. import { Image, ImageBackground, StyleSheet, View, TouchableOpacity, } from 'react-native';
  3. import { Text, } from 'react-native-paper'
  4. import 'react-native-get-random-values';
  5. import { useMockState } from '../contexts/MockContext';
  6. const Account = ({navigation}) => {
  7. const {dispatch, state} = useMockState();
  8. return(
  9. <ImageBackground style={styles.container} source={require('../assets/cover.jpg')}>
  10. <View style={styles.contentContainer}>
  11. <Image style={styles.pfp} source={require('../assets/default-pfp.png')}/>
  12. <View style={styles.quickStats}>
  13. <Text>{state.rank}</Text>
  14. <Text>{state.landmarks.filter(l => l.postedBy == state.username).length}</Text>
  15. <Text></Text>
  16. </View>
  17. </View>
  18. </ImageBackground>
  19. )
  20. }
  21. const styles = StyleSheet.create({
  22. container: {
  23. flex: 1,
  24. justifyContent: 'flex-end'
  25. },
  26. contentContainer: {
  27. backgroundColor: '#df3f3f',
  28. height: '80%',
  29. alignItems: 'center'
  30. },
  31. pfp: {
  32. marginTop: -75,
  33. borderRadius: 75,
  34. zIndex: 5,
  35. height: 150,
  36. width: 150,
  37. },
  38. quickStats: {
  39. width: '100%',
  40. marginTop: 50,
  41. flexDirection: 'row',
  42. justifyContent: 'space-evenly',
  43. },
  44. title: {
  45. fontFamily: 'RacingSansOne-Regular',
  46. marginTop: 30,
  47. color: 'white',
  48. fontSize: 30
  49. },
  50. textContainer: {
  51. marginHorizontal: 20,
  52. borderRadius: 50,
  53. },
  54. textInput: {
  55. marginBottom: 10,
  56. paddingLeft: 30,
  57. borderRadius: 50,
  58. overflow: 'hidden',
  59. backgroundColor: 'white',
  60. height: 50
  61. },
  62. loginBtn: {
  63. borderRadius: 50,
  64. width: 170,
  65. marginLeft: 10,
  66. justifyContent: 'center',
  67. backgroundColor: '#df3f3f',
  68. height: 60,
  69. alignItems: 'center'
  70. },
  71. registerBtn: {
  72. width: 170,
  73. marginRight: 10,
  74. borderColor: 'white',
  75. borderWidth: 2,
  76. borderRadius: 50,
  77. justifyContent: 'center',
  78. backgroundColor: 'transparent',
  79. height: 60,
  80. alignItems: 'center'
  81. },
  82. btnContainer: {
  83. flexDirection: 'row-reverse',
  84. justifyContent: 'center'
  85. },
  86. })
  87. export default Account;