You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.jsx 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. import React from 'react';
  2. import { View, Text, StyleSheet, Image, Pressable } from 'react-native';
  3. import { Link } from 'expo-router';
  4. import { Button, useTheme } from 'react-native-paper';
  5. import text4uLogo from '@/assets/images/text4ulogo.png'
  6. import text4uTitle from '@/assets/images/text4utitle.png'
  7. import PushNotification from '@/components/PushNotification';
  8. const Welcome = () => {
  9. const { colors, button, fonts } = useTheme();
  10. const goToLogin = () => {
  11. console.log("go to login")
  12. }
  13. return (
  14. <View
  15. style={[styles.container, { backgroundColor: colors.background }]}
  16. >
  17. <View style={[styles.logoContainer]}>
  18. <Image style={[styles.logo]} source={text4uLogo}></Image>
  19. <Image style={[styles.logoTitle]} source={text4uTitle}></Image>
  20. </View>
  21. <View style={styles.mainContainer}>
  22. <Text style={[fonts.titleLarge, styles.heading]}>
  23. Notification Made Easy.
  24. </Text>
  25. <Text style={[fonts.titleSmall, styles.subHeading]}>
  26. Empowering you with instant alerts for every important moment!
  27. </Text>
  28. <Pressable style={[button, styles.button]}>
  29. <Link href={"/home"}>
  30. <Text style={styles.buttonLabel}>Get Started</Text>
  31. </Link>
  32. </Pressable>
  33. <Text style={{ ...fonts.titleMedium, ...styles.loginInfo }}>
  34. Already have an account?
  35. <Text style={styles.loginText} onPress={goToLogin}>
  36. Login
  37. </Text>
  38. </Text>
  39. <PushNotification></PushNotification>
  40. </View>
  41. </View>
  42. );
  43. };
  44. const styles = StyleSheet.create({
  45. container: {
  46. flex: 1,
  47. width: "100%"
  48. },
  49. logoContainer:{
  50. marginTop:"auto",
  51. marginBottom:"auto"
  52. },
  53. logo:{
  54. marginLeft:"auto",
  55. marginRight:"auto"
  56. },
  57. logoTitle:{
  58. marginLeft:"auto",
  59. marginRight:"auto"
  60. },
  61. mainContainer:{
  62. alignItems:"center",
  63. marginTop:"auto",
  64. marginBottom:"auto"
  65. },
  66. heading: {
  67. fontWeight: "bold",
  68. marginBottom: 20,
  69. },
  70. subHeading: {
  71. marginBottom: 20,
  72. maxWidth: "70%",
  73. textAlign: "center",
  74. marginBottom: 36
  75. },
  76. button: {
  77. marginBottom: 36,
  78. marginLeft:"auto",
  79. marginRight:"auto",
  80. backgroundColor:"#DD9C47",
  81. paddingVertical:12,
  82. paddingHorizontal:25,
  83. borderRadius:30
  84. },
  85. buttonLabel: {
  86. fontWeight: "700",
  87. color: "#FFF",
  88. fontSize: 16,
  89. },
  90. loginInfo: {
  91. marginBottom: 20,
  92. maxWidth: "70%",
  93. textAlign: "center",
  94. fontWeight: "bold"
  95. },
  96. loginText: {
  97. marginLeft: 5,
  98. color:"#396868"
  99. }
  100. });
  101. export default Welcome;