-
Notifications
You must be signed in to change notification settings - Fork 0
/
RangerHome.js
188 lines (180 loc) · 6.66 KB
/
RangerHome.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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
import * as React from 'react';
import { Linking, Image, StyleSheet, View, TouchableOpacity, SafeAreaView, ScrollView } from 'react-native';
import { useTheme } from 'react-native-paper';
import {
ActivityIndicator,
Appbar,
MD3DarkTheme,
MD3LightTheme,
adaptNavigationTheme,
Avatar,
Card,
Divider,
IconButton,
List,
Button,
Title,
Text,
Paragraph,
TouchableRipple,
Provider as PaperProvider,
} from 'react-native-paper';
import * as firebase from "firebase/app";
import { initializeApp } from "firebase/app";
import { getDatabase, ref, child, get, onValue } from "firebase/database";
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
const firebaseConfig = {
apiKey: "AIzaSyA_5_RK8ebZPrHAErXJS9oPWoXTSvVCVxc",
authDomain: "airassaultapp.firebaseapp.com",
databaseURL: "https://airassaultapp-default-rtdb.firebaseio.com",
projectId: "airassaultapp",
storageBucket: "airassaultapp.appspot.com",
messagingSenderId: "338517476325",
appId: "1:338517476325:web:83c26d9ec94afea080650c",
measurementId: "G-5704YDZHN9"
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
const database = getDatabase();
const styles = StyleSheet.create({
card: {
marginTop: 16,
justifyContent: 'center',
},
cardBtn: {
borderRadius: 10
},
container: {
flex: 1,
paddingTop: 8,
paddingLeft: 8,
paddingRight: 8,
},
scrollView: {
marginHorizontal: 0,
},
scrollViewCards: {
marginHorizontal: 10,
},
newsImage: {
borderWidth: 2,
borderRadius: 8
},
rectangle: {
height: 5,
backgroundColor: '#ffcc01',
position: 'relative',
},
});
function Flashcard({ flashcard }) {
const theme = useTheme();
const [isFlipped, setIsFlipped] = React.useState(false);
const toggleFlip = () => {
setIsFlipped(!isFlipped);
};
return (
<View style={styles.card} key={flashcard.id} title={flashcard.question}>
<TouchableRipple
onPress={toggleFlip}
borderless={true}
style={styles.cardBtn}
>
<Card mode="contained">
<Card.Content>
<View style={{ flexDirection: "row" }}>
<View style={{ flex: 1 }}>
<View style={{ justifyContent: "flex-start" }}>
<Text variant="titleMedium">{flashcard.question}</Text>
{isFlipped && (
<View>
<Divider style={{backgroundColor:theme.colors.onBackground, marginTop:16, marginBottom: 16, marginHorizontal: -16}} bold={true}/>
<Text variant="titleMedium">{flashcard.answer}</Text>
</View>
)}
</View>
</View>
<View>
<View
style={{
justifyContent: "flex-end",
marginTop: 8,
}}
>
</View>
</View>
</View>
</Card.Content>
</Card>
</TouchableRipple>
</View>
);
}
export function RangerScreen({ navigation, route }) {
const theme = useTheme();
const screen = route.name
return(
<ScrollView style={styles.scrollView} showsVerticalScrollIndicator={false}>
<View style={{marginTop: -10, marginBottom: 8}}>
<View style={{alignItems: 'center', backgroundColor: "#221f20", height: 45, borderTopWidth: 5, borderBottomWidth: 3, borderColor: "#ffcc01"}}>
<Text style={{color:"#FFFFFF", fontSize: 20}} variant='headlineLarge'>{screen}</Text>
</View>
<View style={styles.card}>
<Card style={{marginTop: -16, marginBottom: 20}}>
<View style={{borderBottomWidth: 3, borderBottomColor: "#ffcc01"}}>
<Image source={require("./assets/Ranger2.png")}
style={{
width: 'auto',
height: 230,
}}
/>
</View>
<TouchableRipple
onPress={() => {Linking.openURL('https://home.army.mil/campbell/index.php/tsaas/pre-ranger');}}
borderless={true}
style={{borderRadius: 0}}
>
<Card.Title
title="Webpage"
titleVariant="titleLarge"
left={(props) => <Icon name='web' color={theme.colors.primary} size={24} style={{marginLeft:8}}/>}
right={(props) => <Icon name='open-in-new' color={theme.colors.primary} size={24} style={{marginRight: 32}}/>}
/>
</TouchableRipple>
<Divider bold={true}></Divider>
<Card.Content>
<View style={{alignSelf: 'flex-start'}}>
<Text style={{ fontSize: 17, marginTop: 10, marginBottom: 10}}>PURPOSE:</Text>
<View style={styles.rectangle}></View>
</View>
<Text style={{ fontSize: 15, marginTop: 10, marginBottom: 10}}>
To train, assess, and select Ranger Candidates in order to send the most capable,
qualified, and prepared Screaming Eagle Soldiers to the U.S. Army’s premier leadership school.
</Text>
<Divider></Divider>
<View style={{alignSelf: 'flex-start'}}>
<Text style={{ fontSize: 17, marginTop: 10, marginBottom: 10}}>COURSE SCOPE:</Text>
<View style={styles.rectangle}></View>
</View>
<Text style={{ fontSize: 15, marginTop: 10, marginBottom: 10}}>
This course covers the skills and concepts necessary to achieve success as a Ranger Student.
Candidates will be evaluated on their ability to complete an RPFT, 12-mile road march, CWSA,
and Land Navigation. Training will cover individual Soldiers skills and Small Unit Tactics,
including Ambushes, Reconnaissance operations, Formations and Movement techniques, and Troop
Leading Procedures. At the conclusion of the course, Candidates will be better prepared to
represent the Division at the U.S. Army Ranger school.
</Text>
<View style={{alignSelf: 'flex-start'}}>
<Text style={{ fontSize: 17, marginTop: 10, marginBottom: 10}}>NOTE:</Text>
<View style={styles.rectangle}></View>
</View>
<Text style={{ fontSize: 15, marginTop: 10, marginBottom: 10}}>
Packets for entrance must consist of a digitally filled FC 4137 and a complete phase 1 physical
dated within 120 days of course start date along with a dental memorandum.
</Text>
</Card.Content>
</Card>
</View>
</View>
</ScrollView>
);
}