您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

confirmation.jsx 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. import React, { useState } from 'react';
  2. import { View, StyleSheet, TextInput, Text, ScrollView, Image } from 'react-native';
  3. import { Appbar, Menu, Avatar, IconButton, useTheme, Button } from 'react-native-paper';
  4. import { useRouter } from 'expo-router';
  5. import Icon from 'react-native-vector-icons/MaterialIcons';
  6. import burgerImage from "@/assets/images/burger.png";
  7. import dpuser from "@/assets/images/userdp.png";
  8. import { Link } from 'expo-router';
  9. import confirmationNotificationDummyData from "@/dummyData.json";
  10. const Status = () => {
  11. const { colors, fonts } = useTheme();
  12. const [menuVisible, setMenuVisible] = useState(false);
  13. const [searchInput, setSearchInput] = useState("")
  14. const router = useRouter();
  15. return (
  16. <View style={[styles.container, { backgroundColor: colors.background }]}>
  17. <Appbar.Header>
  18. <Link href={"/(tabs)/home"}>
  19. <IconButton
  20. icon="chevron-left"
  21. iconColor={colors.secondary}
  22. size={24}
  23. />
  24. </Link>
  25. <View style={styles.titleContainer}>
  26. <Appbar.Content title="Status" titleStyle={[fonts.titleLarge, styles.title]} />
  27. </View>
  28. <Icon
  29. name="search"
  30. size={40}
  31. color="#FFF"
  32. />
  33. </Appbar.Header>
  34. <View style={{ flex: 1 }}>
  35. <View style={{ alignItems: "center", marginBottom: 20 }}>
  36. <Text style={[fonts.titleLarge, { color: colors.secondary, fontWeight: "bold" }]}>Abang Bob Burger</Text>
  37. <Text style={[fonts.titleMedium, { color: colors.secondary, fontWeight: "bold" }]}>No ID : BobBurgerBangi</Text>
  38. </View>
  39. <Image source={burgerImage} style={styles.itemImage}></Image>
  40. <Text style={[fonts.titleLarge, { fontWeight: "bold", marginBottom: 20 }]}>Notification</Text>
  41. <View style={{ flex: 1, flexDirection: "row", gap: 10 }}>
  42. <Avatar.Image size={60} source={burgerImage} style={{ backgroundColor: "rgba(0,0,0,0.2)" }}></Avatar.Image>
  43. <View style={{ width: "80%" }}>
  44. <View style={{ backgroundColor: "white", borderWidth: 1, borderColor: colors.secondary, borderRadius: 20, padding: 20, marginBottom: 5 }}>
  45. <Text style={[fonts.titleMedium, { fontWeight: "bold", marginBottom: 20 }]}>
  46. Order Ready for Pick Up
  47. </Text>
  48. <Text style={[fonts.titleSmall, { fontWeight: "bold" }]}>
  49. Your order for Burger Ayam Special is now ready for pick up. Please pick up in 15 minutes as we are preparing for closing soon.
  50. </Text>
  51. </View>
  52. <Text style={[fonts.titleSmall, { fontWeight: "bold", marginLeft: "auto", color: "rgba(0,0,0,0.4)" }]}>
  53. 11/2/2024 10:52PM
  54. </Text>
  55. </View>
  56. </View>
  57. <Button
  58. mode="contained"
  59. contentStyle={{ paddingHorizontal: 35 }}
  60. style={{
  61. alignSelf: 'flex-start'
  62. }}
  63. onPress={() => router.push('/(tabs)/home')}
  64. >
  65. <Text>Back</Text>
  66. </Button>
  67. </View>
  68. </View>
  69. );
  70. };
  71. const styles = StyleSheet.create({
  72. itemImage: {
  73. marginLeft: "auto",
  74. marginRight: "auto",
  75. marginBottom: 20
  76. },
  77. container: {
  78. flex: 1,
  79. padding: 20,
  80. width: '100%',
  81. },
  82. badge: {
  83. backgroundColor: "#BB5C3F",
  84. color: "#FFF",
  85. borderRadius: 100,
  86. paddingVertical: 4,
  87. paddingHorizontal: 6,
  88. fontSize: 10,
  89. fontWeight: "400",
  90. verticalAlign: "middle",
  91. marginStart: 5
  92. },
  93. titleContainer: {
  94. flex: 1,
  95. alignItems: 'center',
  96. },
  97. title: {
  98. fontWeight: 'bold',
  99. }
  100. });
  101. export default Status;