Skip to content

Commit 2f17092

Browse files
committed
Navigation and Minor fixes
1 parent b2939cc commit 2f17092

File tree

2 files changed

+204
-80
lines changed

2 files changed

+204
-80
lines changed

TAQ/Navigation.jsx

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import * as React from "react";
2+
import { NavigationContainer } from "@react-navigation/native";
3+
import { createNativeStackNavigator } from "@react-navigation/native-stack";
4+
import Home from "./screens/Home";
5+
import Locations from "./screens/Locations";
6+
import Auth from "./screens/Auth";
7+
import User from "./screens/User";
8+
import ClassQueue from "./screens/ClassQueue";
9+
10+
const Stack = createNativeStackNavigator();
11+
12+
function RootStack() {
13+
return (
14+
<ClassQueue />
15+
// <Stack.Navigator screenOptions={{ headerShown: false }}>
16+
// <Stack.Screen name="Auth" component={Auth} />
17+
// <Stack.Screen
18+
// name="Courses"
19+
// component={Home}
20+
// options={{
21+
// animation: "slide_from_bottom",
22+
// headerBackButtonMenuEnabled: false,
23+
// gestureEnabled: false,
24+
// }}
25+
// />
26+
// <Stack.Screen
27+
// name="Location"
28+
// component={Locations}
29+
// options={{
30+
// animation: "slide_from_right",
31+
// }}
32+
// />
33+
// </Stack.Navigator>
34+
);
35+
}
36+
37+
export default function Navigation() {
38+
return (
39+
<NavigationContainer>
40+
<RootStack />
41+
</NavigationContainer>
42+
);
43+
}

TAQ/screens/ClassQueue.jsx

Lines changed: 161 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,170 @@
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";
714

815
const ClassQueue = () => {
916
return (
1017
<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>
39121
</SafeAreaView>
40-
)
41-
}
122+
);
123+
};
42124

43-
export default ClassQueue
125+
export default ClassQueue;
44126

45127
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+
},
89170
});

0 commit comments

Comments
 (0)