-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNotifications.js
139 lines (134 loc) · 3.4 KB
/
Notifications.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
import { View, Text, StyleSheet, TouchableOpacity } from "react-native";
import Icon from "react-native-vector-icons/AntDesign";
import PushNotification from "./PushNotification";
import MonthlyNotification from "./MonthlyNotification";
import Day1 from "./Notifications/Day1";
import Day2 from "./Notifications/Day2";
import Day3 from "./Notifications/Day3";
import Day4 from "./Notifications/Day4";
import Day5 from "./Notifications/Day5";
import Day6 from "./Notifications/Day6";
import Day7 from "./Notifications/Day7";
import Day8 from "./Notifications/Day8";
import Day9 from "./Notifications/Day9";
import Day10 from "./Notifications/Day10";
import Day11 from "./Notifications/Day11";
import { auth } from "./firebase/firebase";
import { useNavigation } from "@react-navigation/native";
const Notifications = () => {
const handleSignOut = () => {
auth
.signOut()
.then(() => {
navigation.replace("LoginScreen");
})
.catch((error) => alert(error.message));
};
const navigation = useNavigation();
return (
<View style={styles.container}>
<Icon
name="leftcircle"
size={30}
style={{ position: "absolute", top: 45, left: 15, zIndex: 1 }}
color={"#FFA500"}
onPress={() => navigation.replace("Admin")}
/>
<Text
style={{
fontSize: 30,
fontWeight: "800",
// position: "absolute",
marginTop: 40,
marginBottom: 40,
fontFamily: "custom-font",
}}
>
Notification Panel
</Text>
<View style={{ justifyContent: "center", alignItems: "center" }}>
<Text
style={{
marginTop: 25,
marginBottom: 25,
fontSize: 22,
fontFamily: "custom-font",
}}
>
Monthly Notification
</Text>
<MonthlyNotification />
</View>
<Text
style={{
marginTop: 25,
fontSize: 22,
fontFamily: "custom-font",
}}
>
Daily Notifications
</Text>
<View style={{ flex: 1, flexDirection: "row", marginTop: 60 }}>
<View>
<Day1 />
<Day2 />
<Day3 />
</View>
<View
style={{
marginTop: 0,
marginBottom: 0,
}}
>
<Day4 />
<Day5 />
<Day6 />
</View>
<View
style={{
marginTop: 0,
marginBottom: 0,
}}
>
<Day7 />
<Day8 />
<Day9 />
</View>
<View
style={{
marginTop: 0,
marginBottom: 0,
}}
>
<Day10 />
<Day11 />
<PushNotification />
</View>
</View>
<View
style={{
backgroundColor: "#FFA500",
padding: 20,
borderRadius: 50,
position: "absolute",
bottom: 50,
width: 200,
alignItems: "center",
}}
>
<TouchableOpacity onPress={handleSignOut} style={{ zIndex: 10 }}>
<Text style={{ fontSize: 18, color: "white" }}>Sign out</Text>
</TouchableOpacity>
</View>
</View>
);
};
export default Notifications;
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#86c5fd",
alignItems: "center",
justifyContent: "center",
},
});