|
1 | | -import { SafeAreaView, StyleSheet, Text, View, Pressable, ScrollView } from 'react-native' |
2 | | -import React from 'react' |
3 | | -import QueueEntry from '../components/QueueEntry' |
4 | | -import { Colors } from '../config/Colors' |
5 | | -import MaterialIcons from '@expo/vector-icons/MaterialIcons'; |
6 | | - |
| 1 | +import { |
| 2 | + StyleSheet, |
| 3 | + Text, |
| 4 | + View, |
| 5 | + Pressable, |
| 6 | + ScrollView, |
| 7 | + StatusBar, |
| 8 | +} from "react-native"; |
| 9 | +import React from "react"; |
| 10 | +import QueueEntry from "../components/QueueEntry"; |
| 11 | +import { Colors } from "../config/Colors"; |
| 12 | +import MaterialIcons from "@expo/vector-icons/MaterialIcons"; |
| 13 | +import { SafeAreaView } from "react-native-safe-area-context"; |
7 | 14 |
|
8 | 15 | const ClassQueue = () => { |
9 | 16 | return ( |
10 | 17 | <SafeAreaView style={styles.safeArea}> |
11 | | - <ScrollView style={styles.container}> |
12 | | - <Text style={styles.header}> |
13 | | - Class Queue |
14 | | - </Text> |
15 | | - <View style={styles.queueContainer}> |
16 | | - <QueueEntry UBIT={"Manav"} Topic={"PA2"} Question={"How do I append in a list without making a list?"}/> |
17 | | - <QueueEntry UBIT={"Thirumal"} Topic={"WA4"} Question={"How do I append in a list without making a list?"}/> |
18 | | - <QueueEntry UBIT={"Amit"} Topic={"Worksheet"} Question={"How do I append in a list without making a list? How do I reproduce?"}/> |
19 | | - <QueueEntry UBIT={"Thirumal"} Topic={"WA4"} Question={"How do I append in a list without making a list?"}/> |
20 | | - <QueueEntry UBIT={"Thirumal"} Topic={"WA4"} Question={"How do I append in a list without making a list?"}/> |
21 | | - <QueueEntry UBIT={"Thirumal"} Topic={"WA4"} Question={"How do I append in a list without making a list?"}/> |
22 | | - <QueueEntry UBIT={"Thirumal"} Topic={"WA4"} Question={"How do I append in a list without making a list?"}/> |
23 | | - <QueueEntry UBIT={"Thirumal"} Topic={"WA4"} Question={"How do I append in a list without making a list?"}/> |
24 | | - <QueueEntry UBIT={"Thirumal"} Topic={"WA4"} Question={"How do I append in a list without making a list?"}/> |
25 | | - <QueueEntry UBIT={"Thirumal"} Topic={"WA4"} Question={"How do I append in a list without making a list?"}/> |
26 | | - <QueueEntry UBIT={"Thirumal"} Topic={"WA4"} Question={"How do I append in a list without making a list?"}/> |
27 | | - <QueueEntry UBIT={"Thirumal"} Topic={"WA4"} Question={"How do I append in a list without making a list?"}/> |
28 | | - <QueueEntry UBIT={"Thirumal"} Topic={"WA4"} Question={"How do I append in a list without making a list?"}/> |
29 | | - <QueueEntry UBIT={"Thirumal"} Topic={"WA4"} Question={"How do I append in a list without making a list?"}/> |
30 | | - <QueueEntry UBIT={"Thirumal"} Topic={"WA4"} Question={"How do I append in a list without making a list?How do I append in a list without making a list?How do I append in a list without making a list?"}/> |
31 | | - <View style={styles.bottomSpacer} /> |
32 | | - </View> |
33 | | - </ScrollView> |
34 | | - <Pressable style={styles.addButton} onPress={() => { /* Add functionality to add a person to the queue */ }}> |
35 | | - <MaterialIcons name="add-circle-outline" size={24} color={Colors.Background} /> |
36 | | - <Text style={styles.addButtonText}>Add in Queue</Text> |
37 | | - </Pressable> |
38 | | - |
| 18 | + <StatusBar |
| 19 | + barStyle={"light-content"} |
| 20 | + backgroundColor={"transparent"} |
| 21 | + translucent |
| 22 | + /> |
| 23 | + <ScrollView style={styles.container}> |
| 24 | + <Text style={styles.header}>Class Queue</Text> |
| 25 | + <View style={styles.queueContainer}> |
| 26 | + <QueueEntry |
| 27 | + UBIT={"Manav"} |
| 28 | + Topic={"PA2"} |
| 29 | + Question={"How do I append in a list without making a list?"} |
| 30 | + /> |
| 31 | + <QueueEntry |
| 32 | + UBIT={"Thirumal"} |
| 33 | + Topic={"WA4"} |
| 34 | + Question={"How do I append in a list without making a list?"} |
| 35 | + /> |
| 36 | + <QueueEntry |
| 37 | + UBIT={"Amit"} |
| 38 | + Topic={"Worksheet"} |
| 39 | + Question={ |
| 40 | + "How do I append in a list without making a list? How do I reproduce?" |
| 41 | + } |
| 42 | + /> |
| 43 | + <QueueEntry |
| 44 | + UBIT={"Thirumal"} |
| 45 | + Topic={"WA4"} |
| 46 | + Question={"How do I append in a list without making a list?"} |
| 47 | + /> |
| 48 | + <QueueEntry |
| 49 | + UBIT={"Thirumal"} |
| 50 | + Topic={"WA4"} |
| 51 | + Question={"How do I append in a list without making a list?"} |
| 52 | + /> |
| 53 | + <QueueEntry |
| 54 | + UBIT={"Thirumal"} |
| 55 | + Topic={"WA4"} |
| 56 | + Question={"How do I append in a list without making a list?"} |
| 57 | + /> |
| 58 | + <QueueEntry |
| 59 | + UBIT={"Thirumal"} |
| 60 | + Topic={"WA4"} |
| 61 | + Question={"How do I append in a list without making a list?"} |
| 62 | + /> |
| 63 | + <QueueEntry |
| 64 | + UBIT={"Thirumal"} |
| 65 | + Topic={"WA4"} |
| 66 | + Question={"How do I append in a list without making a list?"} |
| 67 | + /> |
| 68 | + <QueueEntry |
| 69 | + UBIT={"Thirumal"} |
| 70 | + Topic={"WA4"} |
| 71 | + Question={"How do I append in a list without making a list?"} |
| 72 | + /> |
| 73 | + <QueueEntry |
| 74 | + UBIT={"Thirumal"} |
| 75 | + Topic={"WA4"} |
| 76 | + Question={"How do I append in a list without making a list?"} |
| 77 | + /> |
| 78 | + <QueueEntry |
| 79 | + UBIT={"Thirumal"} |
| 80 | + Topic={"WA4"} |
| 81 | + Question={"How do I append in a list without making a list?"} |
| 82 | + /> |
| 83 | + <QueueEntry |
| 84 | + UBIT={"Thirumal"} |
| 85 | + Topic={"WA4"} |
| 86 | + Question={"How do I append in a list without making a list?"} |
| 87 | + /> |
| 88 | + <QueueEntry |
| 89 | + UBIT={"Thirumal"} |
| 90 | + Topic={"WA4"} |
| 91 | + Question={"How do I append in a list without making a list?"} |
| 92 | + /> |
| 93 | + <QueueEntry |
| 94 | + UBIT={"Thirumal"} |
| 95 | + Topic={"WA4"} |
| 96 | + Question={"How do I append in a list without making a list?"} |
| 97 | + /> |
| 98 | + <QueueEntry |
| 99 | + UBIT={"Thirumal"} |
| 100 | + Topic={"WA4"} |
| 101 | + Question={ |
| 102 | + "How do I append in a list without making a list?How do I append in a list without making a list?How do I append in a list without making a list?" |
| 103 | + } |
| 104 | + /> |
| 105 | + <View style={styles.bottomSpacer} /> |
| 106 | + </View> |
| 107 | + </ScrollView> |
| 108 | + <Pressable |
| 109 | + style={styles.addButton} |
| 110 | + onPress={() => { |
| 111 | + /* Add functionality to add a person to the queue */ |
| 112 | + }} |
| 113 | + > |
| 114 | + <MaterialIcons |
| 115 | + name="add-circle-outline" |
| 116 | + size={24} |
| 117 | + color={Colors.Background} |
| 118 | + /> |
| 119 | + <Text style={styles.addButtonText}>Add in Queue</Text> |
| 120 | + </Pressable> |
39 | 121 | </SafeAreaView> |
40 | | - ) |
41 | | -} |
| 122 | + ); |
| 123 | +}; |
42 | 124 |
|
43 | | -export default ClassQueue |
| 125 | +export default ClassQueue; |
44 | 126 |
|
45 | 127 | const styles = StyleSheet.create({ |
46 | | - safeArea: { |
47 | | - flex: 1, |
48 | | - backgroundColor: Colors.Background, |
49 | | - }, |
50 | | - container: { |
51 | | - padding: 10, |
52 | | - textAlign: "center", |
53 | | - flex: 1, // Ensures main content takes available space |
54 | | - |
55 | | - }, |
56 | | - header: { |
57 | | - fontSize: 30, |
58 | | - color: Colors.Primary, |
59 | | - fontWeight: "bold", |
60 | | - textAlign: "center", |
61 | | - marginBottom: 20, |
62 | | - }, |
63 | | - queueContainer: { |
64 | | - padding: 10, |
65 | | - gap: 20, |
66 | | - borderColor: Colors.Primary, |
67 | | - }, |
68 | | - addButton: { |
69 | | - flexDirection: 'row', |
70 | | - backgroundColor: Colors.Blue, |
71 | | - padding: 15, |
72 | | - alignItems: 'center', |
73 | | - justifyContent: 'center', |
74 | | - borderRadius: '50%', |
75 | | - position: 'absolute', |
76 | | - bottom: 50, // Adds some spacing from the bottom of the screen |
77 | | - alignSelf: 'center', |
78 | | - width: '90%', |
79 | | - }, |
80 | | - addButtonText: { |
81 | | - color: Colors.Background, |
82 | | - fontWeight: '700', |
83 | | - fontSize: 16, |
84 | | - marginLeft: 8, |
85 | | - }, |
86 | | - bottomSpacer: { |
87 | | - height: 80, // Adjust height based on the space you want between the last item and the button |
88 | | - }, |
| 128 | + safeArea: { |
| 129 | + flex: 1, |
| 130 | + backgroundColor: Colors.Background, |
| 131 | + }, |
| 132 | + container: { |
| 133 | + padding: 10, |
| 134 | + textAlign: "center", |
| 135 | + flex: 1, // Ensures main content takes available space |
| 136 | + }, |
| 137 | + header: { |
| 138 | + fontSize: 30, |
| 139 | + color: Colors.Primary, |
| 140 | + fontWeight: "bold", |
| 141 | + textAlign: "center", |
| 142 | + marginBottom: 20, |
| 143 | + }, |
| 144 | + queueContainer: { |
| 145 | + padding: 10, |
| 146 | + gap: 20, |
| 147 | + borderColor: Colors.Primary, |
| 148 | + }, |
| 149 | + addButton: { |
| 150 | + flexDirection: "row", |
| 151 | + backgroundColor: Colors.Blue, |
| 152 | + padding: 15, |
| 153 | + alignItems: "center", |
| 154 | + justifyContent: "center", |
| 155 | + borderRadius: 100, |
| 156 | + position: "absolute", |
| 157 | + bottom: 50, // Adds some spacing from the bottom of the screen |
| 158 | + alignSelf: "center", |
| 159 | + width: "90%", |
| 160 | + }, |
| 161 | + addButtonText: { |
| 162 | + color: Colors.Background, |
| 163 | + fontWeight: "700", |
| 164 | + fontSize: 16, |
| 165 | + marginLeft: 8, |
| 166 | + }, |
| 167 | + bottomSpacer: { |
| 168 | + height: 80, // Adjust height based on the space you want between the last item and the button |
| 169 | + }, |
89 | 170 | }); |
0 commit comments