-
Notifications
You must be signed in to change notification settings - Fork 0
/
PathfinderHome.js
188 lines (180 loc) · 6.72 KB
/
PathfinderHome.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 PathfinderScreen({ 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/Path2.png")}
style={{
width: 'auto',
height: 230,
}}
/>
</View>
<TouchableRipple
onPress={() => {Linking.openURL('https://home.army.mil/campbell/index.php/tsaas/pathfinder');}}
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}}>
Army Pathfinders are trained to provide navigational aid and advisory
services to military aircraft in areas designated by supported unit
commanders. The Pathfinders’ secondary missions include providing
advice and limited aid to units planning air assault or airdrop operations.
During the Pathfinder course students are instructed in aircraft orientation,
aero-medical evacuation, close combat assault, ground to air communication
procedures, Control Center operations, all three phases of a sling load operation,
Helicopter Landing Zone and Pick Up Zone operations, and Drop Zone operations
(Computed Air Release Point, Ground Marker Release System, and Verbally Initiated
Release System), dealing with U.S. military fixed and rotary wing aircraft for
personnel and equipment.
</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 MUST BE TURNED IN TO TSAAS 10 BUSINESS DAYS PRIOR TO
THE COURSE START DATE. PACKETS WILL NOT BE ACCEPTED WITHIN THAT 10 DAY WINDOW.
{'\n'}{'\n'}
It is recommended to only study the Sling Load Deficiency list on page 66-67 and the
Nomenclature's. Do not study anything in the handbook for HLZ's or DZ's as this will
confuse you. Wait for the block of instruction from the PFDR cadre!
</Text>
</Card.Content>
</Card>
</View>
</View>
</ScrollView>
);
}