Skip to content

Commit 29bd846

Browse files
committed
Fix
1 parent bb55ed9 commit 29bd846

File tree

9 files changed

+193
-140
lines changed

9 files changed

+193
-140
lines changed

frontend/app/(tabs)/profile.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,7 @@ export default function ProfileScreen() {
125125
<ProfileEventCard
126126
key={event.id}
127127
event={event}
128-
onPress={event =>
129-
router.push(`/events/${event.id}/info`)
130-
}
128+
onPress={event => router.push(`/events/${event.id}/info`)}
131129
onCheckIn={() => router.push('/scan?type=check-in')}
132130
onCheckOut={() => router.push('/scan?type=checkout')}
133131
/>

frontend/app/events/[eventId]/cancel.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ import { eventService } from '@/services/eventService';
77
import { LoadingScreen } from '@/components/LoadingScreen';
88
import { Ionicons } from '@expo/vector-icons';
99
import { Image } from 'expo-image';
10-
import { getEventRegistrations, unregister as unregisterRegistration } from '@/services/registrationService';
10+
import {
11+
getEventRegistrations,
12+
unregister as unregisterRegistration,
13+
} from '@/services/registrationService';
1114
import { useAuth } from '@/context/AuthContext';
1215
import { useQueryClient } from '@tanstack/react-query';
1316

@@ -41,7 +44,10 @@ export default function EventCancelPage() {
4144
}
4245
} catch (error) {
4346
console.log('Error cancelling event:', error);
44-
Alert.alert('Error', 'Failed to cancel registration. Please try again.');
47+
Alert.alert(
48+
'Error',
49+
'Failed to cancel registration. Please try again.'
50+
);
4551
} finally {
4652
setLoading(false);
4753
}
@@ -159,7 +165,7 @@ const styles = StyleSheet.create({
159165
color: '#1D0F48',
160166
textAlign: 'center',
161167
marginBottom: 40,
162-
lineHeight: 60
168+
lineHeight: 60,
163169
},
164170
infoSection: {
165171
width: '100%',

frontend/app/events/[eventId]/info.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ export default function EventInfoPage() {
117117
<Text style={styles.backText}>Back</Text>
118118
</Pressable>
119119

120-
<EventInfoTable
121-
{...event}
120+
<EventInfoTable
121+
{...event}
122122
registeredCount={registeredCount}
123123
showCancelButton={showRegisteredView}
124124
onCancelSignUp={handleUnregister}
@@ -146,7 +146,10 @@ export default function EventInfoPage() {
146146
) : (
147147
<View style={styles.signUpSection}>
148148
<Pressable
149-
style={[styles.signUpButton, isRegistered && styles.unregisterButton]}
149+
style={[
150+
styles.signUpButton,
151+
isRegistered && styles.unregisterButton,
152+
]}
150153
onPress={isRegistered ? handleUnregister : handleSignUp}
151154
>
152155
<Text style={styles.signUpButtonText}>

frontend/app/events/[eventId]/signup.tsx

Lines changed: 71 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
import React, { useState, useEffect } from 'react';
2-
import { ImageBackground, ScrollView, StyleSheet, View, Text, Pressable, ActivityIndicator, Alert } from 'react-native';
2+
import {
3+
ImageBackground,
4+
ScrollView,
5+
StyleSheet,
6+
View,
7+
Text,
8+
Pressable,
9+
ActivityIndicator,
10+
Alert,
11+
} from 'react-native';
312
import { SafeAreaView } from 'react-native-safe-area-context';
413
import { useLocalSearchParams, useRouter, Stack } from 'expo-router';
514
import { useAuth } from '@/context/AuthContext';
@@ -79,7 +88,7 @@ export default function EventSignUpPage() {
7988
const start = event?.startDateTime ? new Date(event.startDateTime) : null;
8089
const end = event?.endDateTime ? new Date(event.endDateTime) : null;
8190

82-
const dateFormatted = start
91+
const dateFormatted = start
8392
? start.toLocaleDateString(undefined, {
8493
month: 'long',
8594
day: 'numeric',
@@ -100,39 +109,65 @@ export default function EventSignUpPage() {
100109
return (
101110
<>
102111
<Stack.Screen options={{ headerShown: false }} />
103-
<ImageBackground source={backgroundImage} style={StyleSheet.absoluteFillObject}>
104-
<SafeAreaView style={styles.container}>
105-
<ScrollView contentContainerStyle={styles.scrollContent}>
106-
<Pressable onPress={() => router.back()} style={styles.backButton}>
107-
<Ionicons name="arrow-back" size={24} color="#1D0F48" />
108-
<Text style={styles.backText}>Back</Text>
109-
</Pressable>
110-
<Text style={styles.title}>Sign Up</Text>
111-
<View style={styles.dateSection}>
112-
<View style={{ flexDirection: 'row', alignItems: 'center', marginBottom: 12 }}>
113-
<Ionicons name="calendar-outline" size={24} color="#1D0F48" style={{ marginRight: 8 }} />
114-
<Text style={styles.sectionLabel}>Date:</Text>
115-
<Text style={[styles.dateValue, { marginLeft: 8 }]}>{dateFormatted}</Text>
116-
</View>
117-
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
118-
<Ionicons name="time-outline" size={24} color="#1D0F48" style={{ marginRight: 8 }} />
119-
<Text style={[styles.sectionLabel, ]}>Time:</Text>
120-
<Text style={[styles.dateValue, { marginLeft: 8 }]}>{timeFormatted}</Text>
112+
<ImageBackground
113+
source={backgroundImage}
114+
style={StyleSheet.absoluteFillObject}
115+
>
116+
<SafeAreaView style={styles.container}>
117+
<ScrollView contentContainerStyle={styles.scrollContent}>
118+
<Pressable onPress={() => router.back()} style={styles.backButton}>
119+
<Ionicons name="arrow-back" size={24} color="#1D0F48" />
120+
<Text style={styles.backText}>Back</Text>
121+
</Pressable>
122+
<Text style={styles.title}>Sign Up</Text>
123+
<View style={styles.dateSection}>
124+
<View
125+
style={{
126+
flexDirection: 'row',
127+
alignItems: 'center',
128+
marginBottom: 12,
129+
}}
130+
>
131+
<Ionicons
132+
name="calendar-outline"
133+
size={24}
134+
color="#1D0F48"
135+
style={{ marginRight: 8 }}
136+
/>
137+
<Text style={styles.sectionLabel}>Date:</Text>
138+
<Text style={[styles.dateValue, { marginLeft: 8 }]}>
139+
{dateFormatted}
140+
</Text>
141+
</View>
142+
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
143+
<Ionicons
144+
name="time-outline"
145+
size={24}
146+
color="#1D0F48"
147+
style={{ marginRight: 8 }}
148+
/>
149+
<Text style={[styles.sectionLabel]}>Time:</Text>
150+
<Text style={[styles.dateValue, { marginLeft: 8 }]}>
151+
{timeFormatted}
152+
</Text>
153+
</View>
121154
</View>
122-
</View>
123-
<Pressable
124-
style={[styles.confirmButton, submitting && styles.confirmButtonDisabled]}
125-
onPress={handleConfirm}
126-
disabled={submitting}
127-
>
128-
{submitting ? (
129-
<ActivityIndicator color="#1D0F48" />
130-
) : (
131-
<Text style={styles.confirmButtonText}>Confirm</Text>
132-
)}
133-
</Pressable>
134-
</ScrollView>
135-
</SafeAreaView>
155+
<Pressable
156+
style={[
157+
styles.confirmButton,
158+
submitting && styles.confirmButtonDisabled,
159+
]}
160+
onPress={handleConfirm}
161+
disabled={submitting}
162+
>
163+
{submitting ? (
164+
<ActivityIndicator color="#1D0F48" />
165+
) : (
166+
<Text style={styles.confirmButtonText}>Confirm</Text>
167+
)}
168+
</Pressable>
169+
</ScrollView>
170+
</SafeAreaView>
136171
</ImageBackground>
137172
</>
138173
);
@@ -165,7 +200,7 @@ const styles = StyleSheet.create({
165200
color: '#1D0F48',
166201
paddingHorizontal: 39,
167202
marginBottom: 59,
168-
marginTop: 36.5
203+
marginTop: 36.5,
169204
},
170205
dateSection: {
171206
paddingHorizontal: 39,
@@ -183,7 +218,7 @@ const styles = StyleSheet.create({
183218
fontSize: 24,
184219
fontWeight: '400',
185220
color: '#1D0F48',
186-
marginBottom: 8
221+
marginBottom: 8,
187222
},
188223
confirmButton: {
189224
backgroundColor: '#74C0EB',

frontend/app/events/[eventId]/success.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default function EventSuccessPage() {
3333

3434
const handleShare = async () => {
3535
if (!event) return;
36-
36+
3737
try {
3838
await Share.share({
3939
message: `Check out this event: ${event.name}`,
@@ -130,7 +130,10 @@ export default function EventSuccessPage() {
130130
<Stack.Screen options={{ headerShown: false }} />
131131
<SafeAreaView style={styles.container}>
132132
<View style={styles.content}>
133-
<Pressable onPress={() => router.replace('/')} style={styles.backButton}>
133+
<Pressable
134+
onPress={() => router.replace('/')}
135+
style={styles.backButton}
136+
>
134137
<Ionicons name="arrow-back" size={24} color="#1D0F48" />
135138
<Text style={styles.backText}>Back to Home</Text>
136139
</Pressable>
@@ -201,7 +204,7 @@ const styles = StyleSheet.create({
201204
paddingTop: 20,
202205
alignItems: 'center',
203206
},
204-
backButton: {
207+
backButton: {
205208
position: 'absolute',
206209
top: 20,
207210
left: 16,
@@ -295,7 +298,7 @@ const styles = StyleSheet.create({
295298
marginBottom: 32,
296299
},
297300
treasureContainer: {
298-
marginBottom: 82.24,
301+
marginBottom: 40,
299302
},
300303
treasureIcon: {
301304
width: 148,

frontend/bun.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)